Module: AuthlogicConnect::Common::State

Included in:
Variables
Defined in:
lib/authlogic_connect/common/state.rb

Overview

This class holds query/state variables common to oauth and openid

Instance Method Summary collapse

Instance Method Details

#auth_controller?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/authlogic_connect/common/state.rb', line 4

def auth_controller?
  !auth_controller.blank?
end

#auth_params?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/authlogic_connect/common/state.rb', line 8

def auth_params?
  auth_controller? && !auth_params.blank?
end

#auth_session?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/authlogic_connect/common/state.rb', line 12

def auth_session?
  !auth_session.blank?
end

#is_auth_session?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/authlogic_connect/common/state.rb', line 16

def is_auth_session?
  self.is_a?(Authlogic::Session::Base)
end

#start_authentication?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/authlogic_connect/common/state.rb', line 20

def start_authentication?
  start_oauth? || start_openid?
end

#validate_password_with_oauth?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/authlogic_connect/common/state.rb', line 24

def validate_password_with_oauth?
  !using_openid? && super
end

#validate_password_with_openid?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/authlogic_connect/common/state.rb', line 28

def validate_password_with_openid?
  !using_oauth? && super
end