Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class TokenProperties.
Generated from protobuf message google.cloud.recaptchaenterprise.v1.TokenProperties
Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ valid |
bool
Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment). |
↳ invalid_reason |
int
Reason associated with the response when valid = false. |
↳ create_time |
Google\Protobuf\Timestamp
The timestamp corresponding to the generation of the token. |
↳ hostname |
string
The hostname of the page on which the token was generated (Web keys only). |
↳ android_package_name |
string
The name of the Android package with which the token was generated (Android keys only). |
↳ ios_bundle_id |
string
The ID of the iOS bundle with which the token was generated (iOS keys only). |
↳ action |
string
Action name provided at token generation. |
getValid
Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment).
| Returns | |
|---|---|
| Type | Description |
bool |
|
setValid
Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment).
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInvalidReason
Reason associated with the response when valid = false.
| Returns | |
|---|---|
| Type | Description |
int |
|
setInvalidReason
Reason associated with the response when valid = false.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCreateTime
The timestamp corresponding to the generation of the token.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasCreateTime
clearCreateTime
setCreateTime
The timestamp corresponding to the generation of the token.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getHostname
The hostname of the page on which the token was generated (Web keys only).
| Returns | |
|---|---|
| Type | Description |
string |
|
setHostname
The hostname of the page on which the token was generated (Web keys only).
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAndroidPackageName
The name of the Android package with which the token was generated (Android keys only).
| Returns | |
|---|---|
| Type | Description |
string |
|
setAndroidPackageName
The name of the Android package with which the token was generated (Android keys only).
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getIosBundleId
The ID of the iOS bundle with which the token was generated (iOS keys only).
| Returns | |
|---|---|
| Type | Description |
string |
|
setIosBundleId
The ID of the iOS bundle with which the token was generated (iOS keys only).
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAction
Action name provided at token generation.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAction
Action name provided at token generation.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|