class OmniAuth::Strategies::YahooAuth
Constants
- USER_INFO_API
Public Instance Methods
custom_build_access_token()
click to toggle source
# File lib/omniauth/strategies/yahoo_auth.rb, line 56 def custom_build_access_token get_access_token(request) end
Also aliased as: build_access_token
raw_info()
click to toggle source
# File lib/omniauth/strategies/yahoo_auth.rb, line 50 def raw_info @raw_info ||= access_token.get(USER_INFO_API).parsed rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end
Private Instance Methods
callback_url()
click to toggle source
# File lib/omniauth/strategies/yahoo_auth.rb, line 63 def callback_url options[:redirect_uri] || "#{full_host}#{script_name}#{callback_path}" end
get_access_token(request)
click to toggle source
# File lib/omniauth/strategies/yahoo_auth.rb, line 74 def get_access_token(request) credentials = "#{options.client_id}:#{options.client_secret}" auth = "Basic #{Base64.strict_encode64(credentials)}" client.get_token( { redirect_uri: callback_url, code: request.params['code'], grant_type: 'authorization_code', headers: { 'Authorization' => auth } }.merge(token_params.to_hash(symbolize_keys: true)), deep_symbolize(options.auth_token_params || {}), ) end
prune!(hash)
click to toggle source
# File lib/omniauth/strategies/yahoo_auth.rb, line 67 def prune!(hash) hash.delete_if do |_, value| prune!(value) if value.is_a?(Hash) value.nil? || (value.respond_to?(:empty?) && value.empty?) end end