Class: OmniAuth::AuthenticityTokenProtection

Inherits:
Rack::Protection::AuthenticityToken
  • Object
show all
Defined in:
lib/omniauth/authenticity_token_protection.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AuthenticityTokenProtection

Returns a new instance of AuthenticityTokenProtection.



6
7
8
# File 'lib/omniauth/authenticity_token_protection.rb', line 6

def initialize(options = {})
  @options = default_options.merge(options)
end

Class Method Details

.call(env) ⇒ Object



10
11
12
# File 'lib/omniauth/authenticity_token_protection.rb', line 10

def self.call(env)
  new.call!(env)
end

Instance Method Details

#call!(env) ⇒ Object Also known as: call



14
15
16
17
18
19
# File 'lib/omniauth/authenticity_token_protection.rb', line 14

def call!(env)
  return if accepts?(env)

  instrument env
  react env
end