Module: Passport::State::ClassMethods

Defined in:
lib/passport/core/state.rb

Instance Method Summary collapse

Instance Method Details

#active?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


32
33
34
# File 'lib/passport/core/state.rb', line 32

def authenticating?(type)
  authentication_type == type.to_s
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/passport/core/state.rb', line 8

def key?(key)
  Rack::Context.key?(key)
end

#params?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/passport/core/state.rb', line 20

def params?
  !params.blank?
end

#params_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/passport/core/state.rb', line 16

def params_key?(key)
  Rack::Context.params_key?(key)
end

#session?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/passport/core/state.rb', line 24

def session?
  !session.blank?
end

#session_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/passport/core/state.rb', line 12

def session_key?(key)
  Rack::Context.session_key?(key)
end