Class: OmniAuth::Strategies::AllPlayers
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::AllPlayers
- Defined in:
- lib/omniauth/strategies/allplayers.rb
Overview
An omniauth 1.0 strategy for AllPlayers.com authentication Based on develop.allplayers.com/oauth.html
Instance Method Summary collapse
- #raw_info ⇒ Object
-
#user_info ⇒ Object
Provide the “Person” portion of the raw_info.
Instance Method Details
#raw_info ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/omniauth/strategies/allplayers.rb', line 41 def raw_info # This is a public API and does not need signing or authentication request = "/api/v1/rest/users/current.json" resp_redir = access_token.get(request) user_url = resp_redir['location'] @raw_info ||= MultiJson.load(access_token.get(user_url).body) rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |
#user_info ⇒ Object
Provide the “Person” portion of the raw_info
53 54 55 |
# File 'lib/omniauth/strategies/allplayers.rb', line 53 def user_info @user_info ||= raw_info.nil? ? {} : raw_info end |