Module: Warden::Mixins::Common
- Included in:
- Proxy, Serializers::Base, 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.
-
#response ⇒ Object
Convenience method to access the rack response.
-
#session ⇒ Object
(also: #raw_session)
Convinience method to access the session :api: public.
Instance Method Details
#params ⇒ Object
Convenience method to access the rack request params :api: public
30 31 32 |
# File 'lib/warden/mixins/common.rb', line 30 def params request.params end |
#request ⇒ Object
Convenience method to access the rack request. :api: public
17 18 19 |
# File 'lib/warden/mixins/common.rb', line 17 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
37 38 39 |
# File 'lib/warden/mixins/common.rb', line 37 def reset_session! raw_session.clear end |
#response ⇒ Object
Convenience method to access the rack response. This should be replaced by the actual response returned to the client. :api: public
24 25 26 |
# File 'lib/warden/mixins/common.rb', line 24 def response @response ||= Rack::Response.new(@env) end |
#session ⇒ Object Also known as: raw_session
Convinience method to access the session :api: public
8 9 10 |
# File 'lib/warden/mixins/common.rb', line 8 def session env['rack.session'] end |