Class: OauthService::Yandex
- Defined in:
- app/controllers/concerns/oauth_service/yandex.rb
Constant Summary
Constants inherited from Provider
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
- #get_info_headers(options = {}) ⇒ Object
- #get_info_params(options = {}) ⇒ Object
- #get_user_info(info) ⇒ Object
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( = {}) { 'Authorization' => "OAuth #{[: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( = {}) {} end |
#get_user_info(info) ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/controllers/concerns/oauth_service/yandex.rb', line 3 def get_user_info(info) { :email => info[:default_email], :id => info[:id], :name => info[:display_name] } end |