diff --git a/samples/snippets/cloud-client/src/main/java/recaptcha/CreateAssessment.java b/samples/snippets/cloud-client/src/main/java/recaptcha/CreateAssessment.java index a62bea55..8fed3a1c 100644 --- a/samples/snippets/cloud-client/src/main/java/recaptcha/CreateAssessment.java +++ b/samples/snippets/cloud-client/src/main/java/recaptcha/CreateAssessment.java @@ -39,11 +39,12 @@ public static void main(String[] args) throws IOException { } /** - * Create an assessment to analyze the risk of an UI action. + * Create an assessment to analyze the risk of an UI action. Assessment approach is the same for + * both 'score' and 'checkbox' type recaptcha site keys. * * @param projectID : GCloud Project ID * @param recaptchaSiteKey : Site key obtained by registering a domain/app to use recaptcha - * services. + * services. (score/ checkbox type) * @param token : The token obtained from the client on passing the recaptchaSiteKey. * @param recaptchaAction : Action name corresponding to the token. */ @@ -77,6 +78,7 @@ public static void createAssessment( } // Check if the expected action was executed. + // (If the key is checkbox type and 'action' attribute wasn't set, skip this check.) if (!response.getTokenProperties().getAction().equals(recaptchaAction)) { System.out.println( "The action attribute in reCAPTCHA tag is: "