Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class ProtectedEndpoint.
Configuration for an API endpoint to protect with reCAPTCHA.
Generated from protobuf message google.cloud.recaptchaenterprise.v1.ProtectedEndpoint
Namespace
Google \ Cloud \ RecaptchaEnterprise \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ path |
string
Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/' and '/') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend. Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored). Examples: - |
↳ action |
string
Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores. |
getPath
Required. URI path of the API endpoint to protect. Must start with '/'.
Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/' and '/**') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend. Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored). Examples:
/loginmatches/login,https://example.com/login, and/login?query=1, but not/login/step1./products/*matches/products/123, but not/products/123/456./content/**matches/content/articles/2024/01/01.
| Returns | |
|---|---|
| Type | Description |
string |
|
setPath
Required. URI path of the API endpoint to protect. Must start with '/'.
Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/' and '/**') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend. Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored). Examples:
/loginmatches/login,https://example.com/login, and/login?query=1, but not/login/step1./products/*matches/products/123, but not/products/123/456./content/**matches/content/articles/2024/01/01.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAction
Required. Action name to be used for token generation for this endpoint.
The action name can only contain alphanumeric characters, slashes, and underscores.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAction
Required. Action name to be used for token generation for this endpoint.
The action name can only contain alphanumeric characters, slashes, and underscores.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|