Class: OmniAuth::AuthenticityTokenProtection
- Inherits:
-
Rack::Protection::AuthenticityToken
- Object
- Rack::Protection::Base
- Rack::Protection::AuthenticityToken
- OmniAuth::AuthenticityTokenProtection
- Defined in:
- sig/omniauth.rbs,
lib/omniauth/authenticity_token_protection.rb
Overview
Raises AuthenticityError unless the request has a valid CSRF token.
Class Method Summary collapse
Instance Method Summary collapse
- #call!(env) ⇒ void (also: #call)
-
#initialize(options = {}) ⇒ AuthenticityTokenProtection
constructor
Used as a validation hook rather than as middleware, so there's no app.
Constructor Details
#initialize(options = {}) ⇒ AuthenticityTokenProtection
Used as a validation hook rather than as middleware, so there's no app.
8 9 10 |
# File 'lib/omniauth/authenticity_token_protection.rb', line 8 def initialize( = {}) super(nil, ) end |
Class Method Details
.call(env) ⇒ void
This method returns an undefined value.
12 13 14 |
# File 'lib/omniauth/authenticity_token_protection.rb', line 12 def self.call(env) new.call!(env) end |
Instance Method Details
#call!(env) ⇒ void Also known as: call
This method returns an undefined value.
16 17 18 19 20 21 |
# File 'lib/omniauth/authenticity_token_protection.rb', line 16 def call!(env) return if accepts?(env) instrument env react env end |