Module: Warden::Mixins::Common
- Included in:
- Proxy, Strategies::Base
- Defined in:
- lib/warden/mixins/common.rb
Instance Method Summary collapse
-
#params ⇒ Object
Convenience method to access the rack request params :api: public.
-
#request ⇒ Object
Convenience method to access the rack request.
-
#reset_session! ⇒ Object
Resets the session.
-
#session ⇒ Object
(also: #raw_session)
Convenience method to access the session :api: public.
-
#warden_cookies ⇒ Object
Provides a warden repository for cookies.
Instance Method Details
#params ⇒ Object
Convenience method to access the rack request params :api: public
32 33 34 |
# File 'lib/warden/mixins/common.rb', line 32 def params request.params end |
#request ⇒ Object
Convenience method to access the rack request. :api: public
18 19 20 |
# File 'lib/warden/mixins/common.rb', line 18 def request @request ||= Rack::Request.new(@env) end |
#reset_session! ⇒ Object
Resets the session. By using this non-hash like sessions can be cleared by overwriting this method in a plugin
39 40 41 |
# File 'lib/warden/mixins/common.rb', line 39 def reset_session! raw_session.clear end |
#session ⇒ Object Also known as: raw_session
Convenience method to access the session :api: public
9 10 11 |
# File 'lib/warden/mixins/common.rb', line 9 def session env['rack.session'] end |
#warden_cookies ⇒ Object
Provides a warden repository for cookies. Those are sent to the client when the response is streamed back from the app. :api: public
25 26 27 28 |
# File 'lib/warden/mixins/common.rb', line 25 def warn "warden_cookies was never functional and is going to be removed in next versions" env['warden.cookies'] ||= {} end |