Class: OmniAuth::Strategies::BigCommerce
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::BigCommerce
- Defined in:
- lib/omniauth/strategies/bigcommerce.rb
Overview
BigCommerce OAuth strategy for OmniAuth
Instance Method Summary collapse
-
#authorize_params ⇒ Object
Make sure to pass scope and context through to the authorize call github.com/zquestz/omniauth-google-oauth2/blob/master/lib/omniauth/strategies/google_oauth2.rb#L26.
-
#blank?(value) ⇒ Boolean
Checks for nil or empty values.
-
#callback_url ⇒ Object
Exclude query string in callback url.
- #raw_info ⇒ Object
-
#token_params ⇒ Object
Make sure to pass scope and context through to the token exchange call.
Instance Method Details
#authorize_params ⇒ Object
Make sure to pass scope and context through to the authorize call github.com/zquestz/omniauth-google-oauth2/blob/master/lib/omniauth/strategies/google_oauth2.rb#L26
80 81 82 83 84 85 86 |
# File 'lib/omniauth/strategies/bigcommerce.rb', line 80 def super.tap do |params| [:authorize_options].each do |k| params[k] = request.params[k.to_s] unless blank?(request.params[k.to_s]) end end end |
#blank?(value) ⇒ Boolean
Checks for nil or empty values
101 102 103 |
# File 'lib/omniauth/strategies/bigcommerce.rb', line 101 def blank?(value) value.nil? || value.empty? end |
#callback_url ⇒ Object
Exclude query string in callback url. This used to be part of omniauth-oauth2, but was removed in 1.4.0: github.com/intridea/omniauth-oauth2/pull/70 Note: callback_path already includes script_name (omniauth/strategy.rb#L458), so we must not prepend script_name again here.
74 75 76 |
# File 'lib/omniauth/strategies/bigcommerce.rb', line 74 def callback_url full_host + callback_path end |
#raw_info ⇒ Object
66 67 68 |
# File 'lib/omniauth/strategies/bigcommerce.rb', line 66 def raw_info @raw_info ||= access_token.params end |
#token_params ⇒ Object
Make sure to pass scope and context through to the token exchange call
89 90 91 92 93 94 95 |
# File 'lib/omniauth/strategies/bigcommerce.rb', line 89 def token_params super.tap do |params| [:token_options].each do |k| params[k] = request.params[k.to_s] unless blank?(request.params[k.to_s]) end end end |