Module: EasyAuth::Models::Identities::Oauth2::Google
- Included in:
- Identities::Oauth2::Google
- Defined in:
- lib/easy_auth/models/identities/oauth2/google.rb
Instance Method Summary collapse
- #account_attributes_map ⇒ Object
- #account_attributes_url ⇒ Object
- #authorize_url ⇒ Object
- #oauth2_scope ⇒ Object
- #retrieve_uid(account_attributes) ⇒ Object
- #site_url ⇒ Object
- #token_url ⇒ Object
Instance Method Details
#account_attributes_map ⇒ Object
2 3 4 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 2 def account_attributes_map { :email => 'email', :first_name => 'given_name', :last_name => 'family_name', :name => 'name' } end |
#account_attributes_url ⇒ Object
14 15 16 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 14 def account_attributes_url 'https://www.googleapis.com/oauth2/v1/userinfo' end |
#authorize_url ⇒ Object
6 7 8 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 6 def '/o/oauth2/auth' end |
#oauth2_scope ⇒ Object
10 11 12 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 10 def oauth2_scope 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email' end |
#retrieve_uid(account_attributes) ⇒ Object
26 27 28 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 26 def retrieve_uid(account_attributes) account_attributes['email'] end |
#site_url ⇒ Object
22 23 24 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 22 def site_url 'https://accounts.google.com' end |
#token_url ⇒ Object
18 19 20 |
# File 'lib/easy_auth/models/identities/oauth2/google.rb', line 18 def token_url '/o/oauth2/token' end |