Module: AuthlogicConnect::Openid::State

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

Overview

all these methods must return true or false

Instance Method Summary collapse

Instance Method Details

#authenticating_with_openid?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/authlogic_connect/openid/state.rb', line 32

def authenticating_with_openid?
  auth_controller? && auth_class.activated? && using_openid?
end

#complete_openid?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/authlogic_connect/openid/state.rb', line 40

def complete_openid?
  openid_complete?
end

#openid_identifier?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/authlogic_connect/openid/state.rb', line 9

def openid_identifier?
  openid_request?
end

#openid_provider?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/authlogic_connect/openid/state.rb', line 13

def openid_provider?
  
end

#openid_request?Boolean

  1. to call

Returns:

  • (Boolean)


5
6
7
# File 'lib/authlogic_connect/openid/state.rb', line 5

def openid_request?
  !openid_identifier.blank? && auth_session[:auth_attributes].nil?
end

#openid_response?Boolean Also known as: openid_complete?

  1. from call

better check needed

Returns:

  • (Boolean)


19
20
21
# File 'lib/authlogic_connect/openid/state.rb', line 19

def openid_response?
  auth_controller? && !auth_session[:auth_attributes].nil? && auth_session[:auth_method] == "openid"
end

#start_openid?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/authlogic_connect/openid/state.rb', line 36

def start_openid?
  authenticating_with_openid? && !openid_response?
end

#using_openid?Boolean

  1. either to or from call

this should include more! we know we are using open id if:

the params passed in have "openid_identifier"

Returns:

  • (Boolean)


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

def using_openid?
  auth_controller? && (openid_request? || openid_response?)
end

#validate_password_with_openid?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/authlogic_connect/openid/state.rb', line 44

def validate_password_with_openid?
  !using_openid? && require_password?
end