Class: OmniAuth::Strategies::SavvyCal

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

Instance Method Summary collapse

Instance Method Details

#build_access_tokenObject



35
36
37
38
39
40
41
42
# File 'lib/omniauth/strategies/savvycal.rb', line 35

def build_access_token
  options.token_params.merge!(
    client_id: options.client_id,
    client_secret: options.client_secret
  )

  super
end

#callback_urlObject



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

def callback_url
  options[:callback_url] || (full_host + callback_path)
end

#raw_infoObject



27
28
29
# File 'lib/omniauth/strategies/savvycal.rb', line 27

def raw_info
  @raw_info ||= access_token.get("me", {headers: {"Authorization" => "Bearer #{access_token.token}"}}).parsed
end