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



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

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

#reset(request) ⇒ Object



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

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

#store(request, csrf_token) ⇒ Object



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

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