Class: OmniAuth::Strategies::BigCommerce

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/bigcommerce.rb

Overview

BigCommerce OAuth strategy for OmniAuth

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject

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


70
71
72
73
74
75
76
# File 'lib/omniauth/strategies/bigcommerce.rb', line 70

def authorize_params
  super.tap do |params|
    options[:authorize_options].each do |k|
      params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
    end
  end
end

#callback_urlObject

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


64
65
66
# File 'lib/omniauth/strategies/bigcommerce.rb', line 64

def callback_url
  full_host + script_name + callback_path
end

#raw_infoObject


58
59
60
# File 'lib/omniauth/strategies/bigcommerce.rb', line 58

def raw_info
  @raw_info ||= access_token.params
end

#token_paramsObject

Make sure to pass scope and context through to the token exchange call


79
80
81
82
83
84
85
# File 'lib/omniauth/strategies/bigcommerce.rb', line 79

def token_params
  super.tap do |params|
    options[:token_options].each do |k|
      params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
    end
  end
end