Skip to content

Commit ed4d1b8

Browse files
docs(samples): updated comments in create assessment (#641)
* docs(samples): updated comments Updated comments to clarify create assessment similarity for both score and checkbox based site keys. * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fd40fe6 commit ed4d1b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

recaptcha_enterprise/cloud-client/src/main/java/recaptcha/CreateAssessment.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ public static void main(String[] args) throws IOException {
3939
}
4040

4141
/**
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.
4344
*
4445
* @param projectID : GCloud Project ID
4546
* @param recaptchaSiteKey : Site key obtained by registering a domain/app to use recaptcha
46-
* services.
47+
* services. (score/ checkbox type)
4748
* @param token : The token obtained from the client on passing the recaptchaSiteKey.
4849
* @param recaptchaAction : Action name corresponding to the token.
4950
*/
@@ -77,6 +78,7 @@ public static void createAssessment(
7778
}
7879

7980
// Check if the expected action was executed.
81+
// (If the key is checkbox type and 'action' attribute wasn't set, skip this check.)
8082
if (!response.getTokenProperties().getAction().equals(recaptchaAction)) {
8183
System.out.println(
8284
"The action attribute in reCAPTCHA tag is: "

0 commit comments

Comments
 (0)