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



318
319
320
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 318

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

#reset(request) ⇒ Object



326
327
328
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 326

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

#store(request, csrf_token) ⇒ Object



322
323
324
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 322

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