Class: OmniAuth::Strategies::Attio

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

Overview

Attio Omniauth Strategy

Instance Method Summary collapse

Instance Method Details

#basic_auth_headerObject



28
29
30
# File 'lib/omniauth/strategies/omniauth-attio.rb', line 28

def basic_auth_header
  "Basic " + Base64.strict_encode64("#{options[:client_id]}:#{options[:client_secret]}")
end

#build_access_tokenObject



23
24
25
26
# File 'lib/omniauth/strategies/omniauth-attio.rb', line 23

def build_access_token
  options.token_params.merge!(:headers => {'Authorization' => basic_auth_header })
  super
end

#callback_urlObject



32
33
34
35
# File 'lib/omniauth/strategies/omniauth-attio.rb', line 32

def callback_url
  return options[:redirect_uri] unless options[:redirect_uri].nil?
  full_host + script_name + callback_path
end

#scopeObject



19
20
21
# File 'lib/omniauth/strategies/omniauth-attio.rb', line 19

def scope
  options[:scope]
end