class OmniAuth::Strategies::Snapchat

Public Instance Methods

authorize_params() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/snapchat.rb, line 16
def authorize_params
  super.tap do |params|
    params[:scope] = options[:scope] if options[:scope]
  end
end
callback_url() click to toggle source
# File lib/omniauth/strategies/snapchat.rb, line 45
def callback_url
  options[:redirect_uri] || full_host + script_name + callback_path
end
raw_info() click to toggle source
# File lib/omniauth/strategies/snapchat.rb, line 39
def raw_info
  raw_info_url = "https://adsapi.snapchat.com/v1/me"
  @raw_info ||= access_token.get(raw_info_url, mode: :header, header_format: 'Bearer %s').parsed
  @raw_info || {'me' => {}}
end
token_params() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/snapchat.rb, line 49
def token_params
  authorization = Base64.strict_encode64("#{options.client_id}:#{options.client_secret}")
  super.merge({
    headers: {
      "Authorization" => "Basic #{authorization}"
    },
    parse: :json,
  })
end