Module: Passport::Oauth::State::ClassMethods
- Defined in:
- lib/passport/oauth/protocol/state.rb
Instance Method Summary collapse
- #active? ⇒ Boolean
- #auto_register? ⇒ Boolean
- #params? ⇒ Boolean
- #provider? ⇒ Boolean
- #request? ⇒ Boolean (also: #start?)
- #response? ⇒ Boolean (also: #complete?)
- #token? ⇒ Boolean
Instance Method Details
#active? ⇒ Boolean
20 21 22 |
# File 'lib/passport/oauth/protocol/state.rb', line 20 def active? request? || response? end |
#auto_register? ⇒ Boolean
36 37 38 |
# File 'lib/passport/oauth/protocol/state.rb', line 36 def auto_register? true end |
#params? ⇒ Boolean
24 25 26 |
# File 'lib/passport/oauth/protocol/state.rb', line 24 def params? super && key?(:oauth_provider) end |
#provider? ⇒ Boolean
32 33 34 |
# File 'lib/passport/oauth/protocol/state.rb', line 32 def provider? !provider.blank? end |
#request? ⇒ Boolean Also known as: start?
10 11 12 |
# File 'lib/passport/oauth/protocol/state.rb', line 10 def request? params? && provider? && !response? end |
#response? ⇒ Boolean Also known as: complete?
15 16 17 |
# File 'lib/passport/oauth/protocol/state.rb', line 15 def response? params? && session? && token? end |
#token? ⇒ Boolean
28 29 30 |
# File 'lib/passport/oauth/protocol/state.rb', line 28 def token? provider? && !token.blank? end |