class OmniAuth::Strategies::PaypalOauth2
Constants
- DEFAULT_RESPONSE_TYPE
- DEFAULT_SCOPE
- SANDBOX_AUTHORIZE_URL
- SANDBOX_SITE
Public Instance Methods
callback_url()
click to toggle source
# File lib/omniauth/strategies/paypal_oauth2.rb, line 53 def callback_url full_host + script_name + callback_path end
raw_info()
click to toggle source
# File lib/omniauth/strategies/paypal_oauth2.rb, line 65 def raw_info @raw_info ||= load_identity end
setup_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/paypal_oauth2.rb, line 57 def setup_phase if options.sandbox options.client_options[:site] = SANDBOX_SITE options.client_options[:authorize_url] = SANDBOX_AUTHORIZE_URL end super end
Private Instance Methods
load_identity()
click to toggle source
# File lib/omniauth/strategies/paypal_oauth2.rb, line 78 def load_identity access_token.options[:mode] = :header access_token.options[:param_name] = :access_token access_token.options[:grant_type] = :authorization_code access_token.get( '/v1/identity/oauth2/userinfo', params: { schema: 'paypalv1.1' } ).parsed || {} end
prune!(hash)
click to toggle source
# File lib/omniauth/strategies/paypal_oauth2.rb, line 87 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