Skip to content

Commit 90f258e

Browse files
authored
Merge pull request #8 from jgdevlabs/dev
Adding full support for reCAPTCHA V3 and automatic binding to challenges
2 parents 105b5b1 + 84c31d8 commit 90f258e

28 files changed

+1228
-840
lines changed

CHANGELOG.md

Whitespace-only changes.
File renamed without changes.

ReCaptcha.sln

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29728.190
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.32210.238
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReCaptcha", "src\ReCaptcha\ReCaptcha.csproj", "{0553A2AB-29DC-4328-9F26-3537597C3C23}"
77
EndProject
@@ -10,6 +10,11 @@ EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3A037F16-5150-43AA-80BD-872D99F3F94B}"
1111
ProjectSection(SolutionItems) = preProject
1212
.editorconfig = .editorconfig
13+
azure-pipelines.yml = azure-pipelines.yml
14+
CHANGELOG.md = CHANGELOG.md
15+
LICENSE.md = LICENSE.md
16+
pr-pipelines.yml = pr-pipelines.yml
17+
README.md = README.md
1318
EndProjectSection
1419
EndProject
1520
Global

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ trigger:
66
paths:
77
exclude:
88
- '*/README.md'
9+
- '*/.github/*'
10+
- '*/LICENSE.md'
11+
- '*/CHANGELOG.md'
912

1013
pr: none
1114

docs/GSoftware.AspNetCore.ReCaptcha.xml

Lines changed: 0 additions & 523 deletions
This file was deleted.

docs/Griesoft.AspNetCore.ReCaptcha.xml

Lines changed: 129 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ReCaptcha/BackwardsCompatibility/NullableAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define INTERNAL_NULLABLE_ATTRIBUTES
2-
#if !NETCOREAPP3_0
2+
#if NET461
33

44
// Licensed to the .NET Foundation under one or more agreements.
55
// The .NET Foundation licenses this file to you under the MIT license.

src/ReCaptcha/Configuration/RecaptchaServiceConstants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ internal class RecaptchaServiceConstants
77
{
88
internal const string GoogleRecaptchaEndpoint = "https://www.google.com/recaptcha/api/siteverify";
99
internal const string TokenKeyName = "G-Recaptcha-Response";
10+
internal const string TokenKeyNameLower = "g-recaptcha-response";
1011
internal const string SettingsSectionKey = "RecaptchaSettings";
1112
}
1213
}

src/ReCaptcha/Enums/Render.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
namespace Griesoft.AspNetCore.ReCaptcha.TagHelpers
1+
using System;
2+
3+
namespace Griesoft.AspNetCore.ReCaptcha.TagHelpers
24
{
35
/// <summary>
46
/// Recaptcha rendering options for the <see cref="RecaptchaScriptTagHelper"/>.
57
/// </summary>
8+
[Flags]
69
public enum Render
710
{
811
/// <summary>
9-
/// Render the reCAPTCHA elements explicitly after the scripts have loaded successfully.
10-
/// You need to provide a success callback and handle rendering of the reCAPTCHA elements in it yourself.
12+
/// The default rendering option. This will render your V2 reCAPTCHA elements automatically after the script has been loaded.
1113
/// </summary>
12-
Explicit,
14+
Onload,
1315

1416
/// <summary>
15-
/// The default rendering option. This will render your reCAPTCHA elements automatically after the script has loaded successfully.
17+
/// When rendering your reCAPTCHA elements explicitly a given onloadCallback will be called after the script has been loaded.
1618
/// </summary>
17-
Onload,
19+
Explicit,
1820

1921
/// <summary>
20-
/// Loads the reCAPTCHA V3 script. It will behave mostly the same like <see cref="Explicit"/>, so you have to render the reCAPTCHA elements yourself.
22+
/// Loads the reCAPTCHA V3 script.
2123
/// </summary>
2224
V3
2325
}

src/ReCaptcha/Extensions/TagHelperOutputExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal static class TagHelperOutputExtensions
1818
{
1919
private static readonly char[] SpaceChars = { '\u0020', '\u0009', '\u000A', '\u000C', '\u000D' };
2020

21-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1307:Specify StringComparison", Justification = "<Pending>")]
2221
internal static string AddQueryString(string uri, IEnumerable<KeyValuePair<string, string>> queryString)
2322
{
2423
if (uri == null)

0 commit comments

Comments
 (0)