Class: PassaporteWeb::Client::OAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/passaporte_web/client/oauth.rb

Overview

OAuth2 client used by PassaporteWeb::Client::Application and PassaporteWeb::Client::Identity. Provides direct access to the underlying OAuth2 API.

Class Method Summary collapse

Class Method Details

.buildObject


7
8
9
10
11
12
13
# File 'lib/passaporte_web/client/oauth.rb', line 7

def self.build
  config = PassaporteWeb.configuration
  OAuth2::Client.new(config.application_token,
                     config.application_secret,
                     site: config.url,
                     connection_opts: { headers: headers })
end