Class: ActionController::RequestForgeryProtection::SessionStore

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

Instance Method Summary collapse

Instance Method Details

#fetch(request) ⇒ Object


294
295
296
# File 'actionpack/lib/action_controller/metal/request_forgery_protection.rb', line 294

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

#reset(request) ⇒ Object


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

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

#store(request, csrf_token) ⇒ Object


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

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