Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sita04 and gcf-owl-bot[bot] committed Nov 24, 2021
1 parent 0a89c68 commit c0c9453
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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: "
Expand Down

0 comments on commit c0c9453

Please sign in to comment.