VerificationHandle
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Public Method Summary
abstract int |
|
abstract String
|
|
abstract String
|
getSiteKey
() Returns the site public key you registered for using reCAPTCHA.
|
abstract long |
getTimeoutMinutes
() Returns the validity duration of the object since its creation in minutes.
|
abstract String
|
|
boolean |
|
Inherited Method Summary
From class java.lang.Object
Public Constructors
public
VerificationHandle
()
Public Methods
public abstract int
getCodeLength
()
Returns the length of the PIN code.
public abstract String
getOperationAbortedToken
()
public abstract String
getSiteKey
()
Returns the site public key you registered for using reCAPTCHA.
public abstract long
getTimeoutMinutes
()
Returns the validity duration of the object since its creation in minutes.
public abstract String
getVerificationToken
()
public boolean
isValid
()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eVerificationHandle\u003c/code\u003e stores necessary information for account verification and is valid for a limited time.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to retrieve information like PIN code length, site key, timeout duration, and a verification token.\u003c/p\u003e\n"],["\u003cp\u003eAn aborted \u003ccode\u003echallengeAccount\u003c/code\u003e operation results in an expired \u003ccode\u003eVerificationHandle\u003c/code\u003e containing an operation aborted token for further analysis.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eisValid\u003c/code\u003e method checks if the \u003ccode\u003eVerificationHandle\u003c/code\u003e can be used for account verification with \u003ccode\u003everifyAccount\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt's used with the \u003ccode\u003eRecaptchaClient\u003c/code\u003e to verify accounts using a PIN and handle potential challenge aborts.\u003c/p\u003e\n"]]],[],null,["# VerificationHandle\n\npublic abstract class **VerificationHandle** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Serializable](//developer.android.com/reference/java/io/Serializable.html) \nStores the information required to verify an account.\n\nThis object is only valid for a specific time after creation and it holds all the\ninformation needed to validate a PIN using [verifyAccount(String, VerificationHandle)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#verifyAccount(java.lang.String, com.google.android.gms.recaptcha.VerificationHandle)). If an expired handle is returned by\n[challengeAccount(RecaptchaHandle, String)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#challengeAccount(com.google.android.gms.recaptcha.RecaptchaHandle, java.lang.String)), then [getOperationAbortedToken()](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#getOperationAbortedToken()) will return a token that can be used with the reCAPTCHA\nEnterprise API CreateAssessment() to get more details. \n\n### Public Constructor Summary\n\n|---|---------------------------------------------------------------------------------------------------------------------|\n| | [VerificationHandle](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#VerificationHandle())() |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [getCodeLength](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#getCodeLength())() Returns the length of the PIN code. |\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getOperationAbortedToken](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#getOperationAbortedToken())() Returns a reCAPTCHA token in the case [challengeAccount(RecaptchaHandle, String)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#challengeAccount(com.google.android.gms.recaptcha.RecaptchaHandle, java.lang.String)) operation was aborted and an expired [VerificationHandle](/android/reference/com/google/android/gms/recaptcha/VerificationHandle) was returned, otherwise this returns an empty string. |\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getSiteKey](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#getSiteKey())() Returns the site public key you registered for using reCAPTCHA. |\n| abstract long | [getTimeoutMinutes](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#getTimeoutMinutes())() Returns the validity duration of the object since its creation in minutes. |\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getVerificationToken](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#getVerificationToken())() Returns an encrypted version of the internal verification token that will be used in [verifyAccount(String, VerificationHandle)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#verifyAccount(java.lang.String, com.google.android.gms.recaptcha.VerificationHandle)) call. |\n| boolean | [isValid](/android/reference/com/google/android/gms/recaptcha/VerificationHandle#isValid())() Returns a boolean indicating if the [VerificationHandle](/android/reference/com/google/android/gms/recaptcha/VerificationHandle) is valid for [verifyAccount(String, VerificationHandle)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#verifyAccount(java.lang.String, com.google.android.gms.recaptcha.VerificationHandle)) API calls. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **VerificationHandle** ()\n\nPublic Methods\n--------------\n\n#### public abstract int **getCodeLength** ()\n\nReturns the length of the PIN code. \n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getOperationAbortedToken** ()\n\nReturns a reCAPTCHA token in the case [challengeAccount(RecaptchaHandle, String)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#challengeAccount(com.google.android.gms.recaptcha.RecaptchaHandle, java.lang.String)) operation was aborted and an\nexpired [VerificationHandle](/android/reference/com/google/android/gms/recaptcha/VerificationHandle)\nwas returned, otherwise this returns an empty string. This can be used with the\nreCAPTCHA Enterprise API CreateAssessment() to retrieve more details. \n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getSiteKey** ()\n\nReturns the site public key you registered for using reCAPTCHA. \n\n#### public abstract long **getTimeoutMinutes** ()\n\nReturns the validity duration of the object since its creation in minutes. \n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getVerificationToken** ()\n\nReturns an encrypted version of the internal verification token that will be used in\n[verifyAccount(String, VerificationHandle)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#verifyAccount(java.lang.String, com.google.android.gms.recaptcha.VerificationHandle)) call. \n\n#### public boolean **isValid** ()\n\nReturns a boolean indicating if the [VerificationHandle](/android/reference/com/google/android/gms/recaptcha/VerificationHandle)\nis valid for [verifyAccount(String, VerificationHandle)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#verifyAccount(java.lang.String, com.google.android.gms.recaptcha.VerificationHandle)) API calls. An invalid handle will\ncause [verifyAccount(String, VerificationHandle)](/android/reference/com/google/android/gms/recaptcha/RecaptchaClient#verifyAccount(java.lang.String, com.google.android.gms.recaptcha.VerificationHandle)) calls to fail immediately."]]