Class: OmniAuth::Strategies::Snapchat
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Snapchat
- Defined in:
- lib/omniauth/strategies/snapchat.rb
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
16 17 18 19 20 |
# File 'lib/omniauth/strategies/snapchat.rb', line 16 def super.tap do |params| params[:scope] = [:scope] if [:scope] end end |
#callback_url ⇒ Object
45 46 47 |
# File 'lib/omniauth/strategies/snapchat.rb', line 45 def callback_url [:redirect_uri] || full_host + script_name + callback_path end |
#raw_info ⇒ Object
39 40 41 42 43 |
# 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 ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/omniauth/strategies/snapchat.rb', line 49 def token_params = Base64.strict_encode64("#{.client_id}:#{.client_secret}") super.merge({ headers: { "Authorization" => "Basic #{}" }, parse: :json, }) end |