Class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallAction
- Inherits:
-
Object
- Object
- Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallAction
- 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
An individual action. Each action represents what to do if a policy matches.
Instance Attribute Summary collapse
-
#allow ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction
An allow action continues processing a request unimpeded.
-
#block ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction
A block action serves an HTTP error code a prevents the request from hitting the backend.
-
#include_recaptcha_script ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction
An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript code into the HTML returned by the site backend.
-
#redirect ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction
A redirect action returns a 307 (temporary redirect) response, pointing the user to a reCAPTCHA interstitial page to attach a token.
-
#set_header ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction
A set header action sets a header and forwards the request to the backend.
-
#substitute ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction
A substitute action transparently serves a different page than the one requested.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRecaptchaenterpriseV1FirewallAction
constructor
A new instance of GoogleCloudRecaptchaenterpriseV1FirewallAction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRecaptchaenterpriseV1FirewallAction
Returns a new instance of GoogleCloudRecaptchaenterpriseV1FirewallAction.
663 664 665 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 663 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allow ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction
An allow action continues processing a request unimpeded.
Corresponds to the JSON property allow
628 629 630 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 628 def allow @allow end |
#block ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction
A block action serves an HTTP error code a prevents the request from hitting
the backend.
Corresponds to the JSON property block
634 635 636 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 634 def block @block end |
#include_recaptcha_script ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction
An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript
code into the HTML returned by the site backend. This reCAPTCHA script is
tasked with collecting user signals on the requested web page, issuing tokens
as a cookie within the site domain, and enabling their utilization in
subsequent page requests.
Corresponds to the JSON property includeRecaptchaScript
643 644 645 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 643 def include_recaptcha_script @include_recaptcha_script end |
#redirect ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction
A redirect action returns a 307 (temporary redirect) response, pointing the
user to a reCAPTCHA interstitial page to attach a token.
Corresponds to the JSON property redirect
649 650 651 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 649 def redirect @redirect end |
#set_header ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction
A set header action sets a header and forwards the request to the backend.
This can be used to trigger custom protection implemented on the backend.
Corresponds to the JSON property setHeader
655 656 657 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 655 def set_header @set_header end |
#substitute ⇒ Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction
A substitute action transparently serves a different page than the one
requested.
Corresponds to the JSON property substitute
661 662 663 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 661 def substitute @substitute end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
668 669 670 671 672 673 674 675 |
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 668 def update!(**args) @allow = args[:allow] if args.key?(:allow) @block = args[:block] if args.key?(:block) @include_recaptcha_script = args[:include_recaptcha_script] if args.key?(:include_recaptcha_script) @redirect = args[:redirect] if args.key?(:redirect) @set_header = args[:set_header] if args.key?(:set_header) @substitute = args[:substitute] if args.key?(:substitute) end |