Class: Kingsman::Hooks::Proxy
- Inherits:
-
Object
- Object
- Kingsman::Hooks::Proxy
- Includes:
- Controllers::Rememberable, Controllers::SignInOut
- Defined in:
- lib/kingsman/hooks/proxy.rb
Overview
A small warden proxy so we can remember, forget and sign out users from hooks.
Instance Attribute Summary collapse
-
#warden ⇒ Object
readonly
Returns the value of attribute warden.
Instance Method Summary collapse
-
#initialize(warden) ⇒ Proxy
constructor
A new instance of Proxy.
- #session ⇒ Object
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/kingsman/hooks/proxy.rb', line 14 def initialize(warden) @warden = warden end |
Instance Attribute Details
#warden ⇒ Object (readonly)
Returns the value of attribute warden.
11 12 13 |
# File 'lib/kingsman/hooks/proxy.rb', line 11 def warden @warden end |
Instance Method Details
#session ⇒ Object
18 19 20 |
# File 'lib/kingsman/hooks/proxy.rb', line 18 def session warden.request.session end |