Module: AuthlogicConnect::Oauth::Session::InstanceMethods
- Includes:
- Process
- Defined in:
- lib/authlogic_connect/oauth/session.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#credentials=(value) ⇒ Object
Hooks into credentials so that you can pass a user who has already has an oauth access token.
- #record=(record) ⇒ Object
Methods included from Process
#cleanup_oauth_session, #complete_oauth, #restore_attributes, #save_auth_session_token, #save_oauth_session, #start_oauth, #validate_by_oauth
Methods included from Variables
#oauth_consumer, #oauth_provider, #oauth_response, #oauth_token, #oauth_token_and_secret, #oauth_variables, #oauth_version, #stored_oauth_token_and_secret, #token_class
Methods included from AuthlogicConnect::Oauth::State
#allow_oauth_redirect?, #authenticating_with_oauth?, #complete_oauth?, #new_oauth_request?, #oauth_complete?, #oauth_provider?, #oauth_request?, #oauth_response?, #start_oauth?, #stored_oauth_token_and_secret?, #using_oauth?, #validate_password_with_oauth?
Class Method Details
.included(klass) ⇒ Object
14 15 16 17 18 |
# File 'lib/authlogic_connect/oauth/session.rb', line 14 def self.included(klass) klass.class_eval do validate :validate_by_oauth, :if => :authenticating_with_oauth? end end |
Instance Method Details
#credentials=(value) ⇒ Object
Hooks into credentials so that you can pass a user who has already has an oauth access token.
21 22 23 24 25 26 |
# File 'lib/authlogic_connect/oauth/session.rb', line 21 def credentials=(value) super values = value.is_a?(Array) ? value : [value] hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil self.record = hash[:priority_record] if !hash.nil? && hash.key?(:priority_record) end |
#record=(record) ⇒ Object
28 29 30 |
# File 'lib/authlogic_connect/oauth/session.rb', line 28 def record=(record) @record = record end |