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
- #authenticating_with_openid? ⇒ Boolean
- #complete_openid? ⇒ Boolean
- #openid_identifier? ⇒ Boolean
- #openid_provider? ⇒ Boolean
-
#openid_request? ⇒ Boolean
1.
-
#openid_response? ⇒ Boolean
(also: #openid_complete?)
2.
- #start_openid? ⇒ Boolean
-
#using_openid? ⇒ Boolean
3.
- #validate_password_with_openid? ⇒ Boolean
Instance Method Details
#authenticating_with_openid? ⇒ 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
40 41 42 |
# File 'lib/authlogic_connect/openid/state.rb', line 40 def complete_openid? openid_complete? end |
#openid_identifier? ⇒ Boolean
9 10 11 |
# File 'lib/authlogic_connect/openid/state.rb', line 9 def openid_identifier? openid_request? end |
#openid_provider? ⇒ Boolean
13 14 15 |
# File 'lib/authlogic_connect/openid/state.rb', line 13 def openid_provider? end |
#openid_request? ⇒ Boolean
-
to call
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?
-
from call
better check needed
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
36 37 38 |
# File 'lib/authlogic_connect/openid/state.rb', line 36 def start_openid? authenticating_with_openid? && !openid_response? end |
#using_openid? ⇒ Boolean
-
either to or from call
this should include more! we know we are using open id if:
the params passed in have "openid_identifier"
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
44 45 46 |
# File 'lib/authlogic_connect/openid/state.rb', line 44 def validate_password_with_openid? !using_openid? && require_password? end |