Class: OmniAuth::Strategies::Artsy

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configureObject



8
9
10
11
12
13
14
# File 'lib/omniauth/strategies/artsy.rb', line 8

def self.configure
  option :client_options,
         site: OmniAuth::Artsy.config.artsy_api_url || ENV['ARTSY_API_URL'] || ENV['gravity_url'],
         authorize_url: '/oauth2/authorize?scope=offline_access&response_type=code',
         token_url: '/oauth2/access_token?scope=offline_access&response_type=code&grant_type=authorization_code',
         auth_scheme: :request_body
end

Instance Method Details

#raw_infoObject



26
27
28
# File 'lib/omniauth/strategies/artsy.rb', line 26

def raw_info
  @raw_info ||= access_token.get('/api/current_user', headers: { 'X-ACCESS-TOKEN' => access_token.token }).parsed
end