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