Class: ActionController::RequestForgeryProtection::SessionStore

Inherits:
Object
  • Object
show all
Defined in:
lib/action_controller/metal/request_forgery_protection.rb

Instance Method Summary collapse

Instance Method Details

#fetch(request) ⇒ Object



298
299
300
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 298

def fetch(request)
  request.session[:_csrf_token]
end

#reset(request) ⇒ Object



306
307
308
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 306

def reset(request)
  request.session.delete(:_csrf_token)
end

#store(request, csrf_token) ⇒ Object



302
303
304
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 302

def store(request, csrf_token)
  request.session[:_csrf_token] = csrf_token
end