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

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

Methods included from Controllers::Rememberable

cookie_values, #forget_me, #remember_me, #remember_me_is_active?

Constructor Details

#initialize(warden) ⇒ Proxy

Returns a new instance of Proxy.



14
15
16
# File 'lib/devise/hooks/proxy.rb', line 14

def initialize(warden)
  @warden = warden
end

Instance Attribute Details

#wardenObject (readonly)

Returns the value of attribute warden.



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

def warden
  @warden
end

Instance Method Details

#sessionObject



18
19
20
# File 'lib/devise/hooks/proxy.rb', line 18

def session
  warden.request.session
end