Class: OauthService::Yandex

Inherits:
Provider show all
Defined in:
app/controllers/concerns/oauth_service/yandex.rb

Constant Summary

Constants inherited from Provider

Provider::AVAILABLE_PROVIDERS

Instance Attribute Summary

Attributes inherited from Provider

#auth_url, #client_id, #client_secret, #downcase_name, #info_url, #name, #scopes, #token_url

Instance Method Summary collapse

Methods inherited from Provider

get_provider_by_name, #get_redirect_uri, #get_token_params, #initialize, providers_data

Constructor Details

This class inherits a constructor from OauthService::Provider

Instance Method Details

#get_info_headers(options = {}) ⇒ Object



11
12
13
# File 'app/controllers/concerns/oauth_service/yandex.rb', line 11

def get_info_headers(options = {})
  { 'Authorization' => "OAuth #{options[:access_token]}" }
end

#get_info_params(options = {}) ⇒ Object



15
16
17
# File 'app/controllers/concerns/oauth_service/yandex.rb', line 15

def get_info_params(options = {})
  {}
end

#get_user_info(info) ⇒ Object



3
4
5
6
7
8
9
# File 'app/controllers/concerns/oauth_service/yandex.rb', line 3

def (info)
  {
    :email => info[:default_email],
    :id => info[:id],
    :name => info[:display_name]
  }
end