Class: OmniAuth::Strategies::Yahoo
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::Yahoo
- Defined in:
- lib/omniauth/strategies/yahoo.rb
Overview
An omniauth 1.0 strategy for yahoo authentication
Instance Method Summary collapse
-
#raw_info ⇒ Object
Return info gathered from the v1/user/:id/profile API call.
-
#user_info ⇒ Object
Provide the “Profile” portion of the raw_info.
Instance Method Details
#raw_info ⇒ Object
Return info gathered from the v1/user/:id/profile API call
51 52 53 54 55 56 57 |
# File 'lib/omniauth/strategies/yahoo.rb', line 51 def raw_info # This is a public API and does not need signing or authentication request = "https://social.yahooapis.com/v1/user/#{uid}/profile?format=json" @raw_info ||= MultiJson.decode(access_token.get(request).body) rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |
#user_info ⇒ Object
Provide the “Profile” portion of the raw_info
61 62 63 |
# File 'lib/omniauth/strategies/yahoo.rb', line 61 def user_info @user_info ||= raw_info.nil? ? {} : raw_info["profile"] end |