Class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ProtectedEndpoint

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/recaptchaenterprise_v1/classes.rb,
lib/google/apis/recaptchaenterprise_v1/representations.rb,
lib/google/apis/recaptchaenterprise_v1/representations.rb

Overview

Configuration for an API endpoint to protect with reCAPTCHA.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecaptchaenterpriseV1ProtectedEndpoint

Returns a new instance of GoogleCloudRecaptchaenterpriseV1ProtectedEndpoint.



1840
1841
1842
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1840

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#actionString

Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores. Corresponds to the JSON property action

Returns:

  • (String)


1825
1826
1827
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1825

def action
  @action
end

#pathString

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: - / login matches /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. Corresponds to the JSON propertypath`

Returns:

  • (String)


1838
1839
1840
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1838

def path
  @path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1845
1846
1847
1848
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 1845

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @path = args[:path] if args.key?(:path)
end