Class: Devise::Hooks::Proxy

Inherits:
Object
  • Object
show all
Includes:
Controllers::Rememberable, Controllers::SignInOut
Defined in:
lib/devise/hooks/proxy.rb

Overview

A small warden proxy so we can remember, forget and sign out users from hooks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Controllers::SignInOut

#sign_in, #sign_out, #sign_out_all_scopes, #signed_in?

Methods included from Controllers::Rememberable

cookie_values, #forget_cookie_values, #forget_me, #remember_cookie_values, #remember_key, #remember_me

Constructor Details

#initialize(warden) ⇒ Proxy

Returns a new instance of Proxy.



12
13
14
# File 'lib/devise/hooks/proxy.rb', line 12

def initialize(warden)
  @warden = warden
end

Instance Attribute Details

#wardenObject (readonly)

Returns the value of attribute warden.



9
10
11
# File 'lib/devise/hooks/proxy.rb', line 9

def warden
  @warden
end

Instance Method Details

#sessionObject



16
17
18
# File 'lib/devise/hooks/proxy.rb', line 16

def session
  warden.request.session
end