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

#allow_openid_redirect?Boolean

Returns:

  • (Boolean)


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

def allow_openid_redirect?
  authenticating_with_openid?
end

#authenticating_with_openid?Boolean

Returns:

  • (Boolean)


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

def authenticating_with_openid?
  session_class.activated? && using_openid?
end

#openid_identifier?Boolean

Returns:

  • (Boolean)


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

def openid_identifier?
  openid_request?
end

#openid_provider?Boolean

Returns:

  • (Boolean)


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

def openid_provider?
  
end

#openid_request?Boolean

  1. to call

Returns:

  • (Boolean)


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

def openid_request?
  !openid_identifier.blank?
end

#openid_response?Boolean Also known as: openid_complete?

  1. from call

better check needed

Returns:

  • (Boolean)


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

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

#redirecting_to_openid_server?Boolean

Returns:

  • (Boolean)


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

def redirecting_to_openid_server?
  allow_openid_redirect? && !authenticate_with_openid
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)


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

def using_openid?
  openid_request? || openid_response?
end

#validate_password_with_openid?Boolean

Returns:

  • (Boolean)


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

def validate_password_with_openid?
  !using_openid? && require_password?
end