Class: CSRFTokenVerifier
- Inherits:
-
Object
- Object
- CSRFTokenVerifier
- Includes:
- ActionController::RequestForgeryProtection, ActiveSupport::Configurable
- Defined in:
- lib/csrf_token_verifier.rb
Overview
Provides a way to check a CSRF token outside of a controller
Defined Under Namespace
Classes: InvalidCSRFToken
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
19 20 21 22 23 |
# File 'lib/csrf_token_verifier.rb', line 19 def call(env) @request = ActionDispatch::Request.new(env.dup) raise InvalidCSRFToken unless verified_request? end |