File tree 1 file changed +4
-2
lines changed
recaptcha_enterprise/cloud-client/src/main/java/recaptcha
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ public static void main(String[] args) throws IOException {
39
39
}
40
40
41
41
/**
42
- * Create an assessment to analyze the risk of an UI action.
42
+ * Create an assessment to analyze the risk of an UI action. Assessment approach is the same for
43
+ * both 'score' and 'checkbox' type recaptcha site keys.
43
44
*
44
45
* @param projectID : GCloud Project ID
45
46
* @param recaptchaSiteKey : Site key obtained by registering a domain/app to use recaptcha
46
- * services.
47
+ * services. (score/ checkbox type)
47
48
* @param token : The token obtained from the client on passing the recaptchaSiteKey.
48
49
* @param recaptchaAction : Action name corresponding to the token.
49
50
*/
@@ -77,6 +78,7 @@ public static void createAssessment(
77
78
}
78
79
79
80
// Check if the expected action was executed.
81
+ // (If the key is checkbox type and 'action' attribute wasn't set, skip this check.)
80
82
if (!response .getTokenProperties ().getAction ().equals (recaptchaAction )) {
81
83
System .out .println (
82
84
"The action attribute in reCAPTCHA tag is: "
You can’t perform that action at this time.
0 commit comments