Module: Passport::State::ClassMethods
- Defined in:
- lib/passport/core/state.rb
Instance Method Summary collapse
- #active? ⇒ Boolean
- #authenticating?(type) ⇒ Boolean
- #key?(key) ⇒ Boolean
- #params? ⇒ Boolean
- #params_key?(key) ⇒ Boolean
- #session? ⇒ Boolean
- #session_key?(key) ⇒ Boolean
Instance Method Details
#active? ⇒ Boolean
28 29 30 |
# File 'lib/passport/core/state.rb', line 28 def active? Passport::Oauth::Protocol.active? || Passport::Oauth::Protocol.active? end |
#authenticating?(type) ⇒ Boolean
32 33 34 |
# File 'lib/passport/core/state.rb', line 32 def authenticating?(type) authentication_type == type.to_s end |
#key?(key) ⇒ Boolean
8 9 10 |
# File 'lib/passport/core/state.rb', line 8 def key?(key) Rack::Context.key?(key) end |
#params? ⇒ Boolean
20 21 22 |
# File 'lib/passport/core/state.rb', line 20 def params? !params.blank? end |
#params_key?(key) ⇒ Boolean
16 17 18 |
# File 'lib/passport/core/state.rb', line 16 def params_key?(key) Rack::Context.params_key?(key) end |
#session? ⇒ Boolean
24 25 26 |
# File 'lib/passport/core/state.rb', line 24 def session? !session.blank? end |
#session_key?(key) ⇒ Boolean
12 13 14 |
# File 'lib/passport/core/state.rb', line 12 def session_key?(key) Rack::Context.session_key?(key) end |