Class: OmniAuth::Strategies::PaypalOauth2
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::PaypalOauth2
- Defined in:
- lib/omniauth/strategies/paypal_oauth2.rb
Constant Summary collapse
- DEFAULT_SCOPE =
'openid email profile'- DEFAULT_RESPONSE_TYPE =
'code'- SANDBOX_SITE =
'https://api.sandbox.paypal.com'- SANDBOX_AUTHORIZE_URL =
'https://www.sandbox.paypal.com/signin/authorize'
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
69 70 71 72 73 74 |
# File 'lib/omniauth/strategies/paypal_oauth2.rb', line 69 def super.tap do |params| params[:scope] ||= DEFAULT_SCOPE params[:response_type] ||= DEFAULT_RESPONSE_TYPE end end |
#callback_url ⇒ Object
53 54 55 |
# File 'lib/omniauth/strategies/paypal_oauth2.rb', line 53 def callback_url full_host + script_name + callback_path end |
#raw_info ⇒ Object
65 66 67 |
# File 'lib/omniauth/strategies/paypal_oauth2.rb', line 65 def raw_info @raw_info ||= load_identity end |
#setup_phase ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/omniauth/strategies/paypal_oauth2.rb', line 57 def setup_phase if .sandbox .[:site] = SANDBOX_SITE .[:authorize_url] = SANDBOX_AUTHORIZE_URL end super end |