Class: OmniAuth::Strategies::Shopqi

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

Constant Summary collapse

DEFAULT_SCOPE =

Available scopes: content themes products customers orders script_tags shipping read_* or write_*

'read_products'

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



17
18
19
20
21
# File 'lib/omniauth/strategies/shopqi.rb', line 17

def authorize_params
  super.tap do |params|
    params[:scope] ||= DEFAULT_SCOPE
  end
end

#callback_urlObject



23
24
25
# File 'lib/omniauth/strategies/shopqi.rb', line 23

def callback_url
  options.callback_url || super
end

#raw_infoObject



31
32
33
# File 'lib/omniauth/strategies/shopqi.rb', line 31

def raw_info
  @raw_info ||= access_token.get('/api/shop').parsed
end