Module: AuthlogicCrowd::Session::InstanceMethods
- Defined in:
- lib/authlogic_crowd/session.rb
Instance Method Summary collapse
- #auto_register? ⇒ Boolean
- #can_auto_register?(crowd_username) ⇒ Boolean
- #crowd_client ⇒ Object
- #crowd_record ⇒ Object
- #crowd_synchronizer ⇒ Object
- #explicit_login_from_crowd_token? ⇒ Boolean
- #initialize(*args) ⇒ Object
-
#new_registration? ⇒ Boolean
Determines if the authenticated user is also a new registration.
Instance Method Details
#auto_register? ⇒ Boolean
77 78 79 |
# File 'lib/authlogic_crowd/session.rb', line 77 def auto_register? self.class.auto_register_value end |
#can_auto_register?(crowd_username) ⇒ Boolean
81 82 83 |
# File 'lib/authlogic_crowd/session.rb', line 81 def can_auto_register?(crowd_username) auto_register? end |
#crowd_client ⇒ Object
97 98 99 |
# File 'lib/authlogic_crowd/session.rb', line 97 def crowd_client @crowd_client ||= klass.crowd_client end |
#crowd_record ⇒ Object
89 90 91 92 93 94 95 |
# File 'lib/authlogic_crowd/session.rb', line 89 def crowd_record if @valid_crowd_user[:user_token] && !@valid_crowd_user.has_key?(:record) @valid_crowd_user[:record] = crowd_client.find_user_by_token(@valid_crowd_user[:user_token]) end @valid_crowd_user[:record] end |
#crowd_synchronizer ⇒ Object
101 102 103 |
# File 'lib/authlogic_crowd/session.rb', line 101 def crowd_synchronizer @crowd_synchronizer ||= klass.crowd_synchronizer(crowd_client) end |
#explicit_login_from_crowd_token? ⇒ Boolean
85 86 87 |
# File 'lib/authlogic_crowd/session.rb', line 85 def explicit_login_from_crowd_token? !!self.class.explicit_login_from_crowd_token end |
#initialize(*args) ⇒ Object
66 67 68 69 |
# File 'lib/authlogic_crowd/session.rb', line 66 def initialize(*args) super @valid_crowd_user = {} end |
#new_registration? ⇒ Boolean
Determines if the authenticated user is also a new registration. For use in the session controller to help direct the most appropriate action to follow.
73 74 75 |
# File 'lib/authlogic_crowd/session.rb', line 73 def new_registration? new_registration || !new_registration.nil? end |