Class: OmniAuth::AuthHash
- Defined in:
- lib/omniauth/auth_hash.rb
Overview
The AuthHash is a normalized schema returned by all OmniAuth
strategies. It maps as much user information as the provider
is able to provide into the InfoHash (stored as the 'info'
key).
Defined Under Namespace
Classes: InfoHash
Class Method Summary collapse
Instance Method Summary collapse
- #regular_writer(key, value) ⇒ Object
-
#valid? ⇒ Boolean
Tells you if this is considered to be a valid OmniAuth AuthHash.
Methods inherited from KeyStore
Class Method Details
.subkey_class ⇒ Object
9 10 11 |
# File 'lib/omniauth/auth_hash.rb', line 9 def self.subkey_class Hashie::Mash end |
Instance Method Details
#regular_writer(key, value) ⇒ Object
22 23 24 25 |
# File 'lib/omniauth/auth_hash.rb', line 22 def regular_writer(key, value) value = InfoHash.new(value) if key.to_s == 'info' && value.is_a?(::Hash) && !value.is_a?(InfoHash) super end |
#valid? ⇒ Boolean
Tells you if this is considered to be a valid OmniAuth AuthHash. The requirements for that are that it has a provider name, a uid, and a valid info hash. See InfoHash#valid? for more details there.
18 19 20 |
# File 'lib/omniauth/auth_hash.rb', line 18 def valid? uid? && provider? && info? && info.valid? end |