Class: OmniAuth::Strategies::FamilySearch
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::FamilySearch
- Defined in:
- lib/omniauth/strategies/familysearch.rb
Instance Method Summary collapse
- #authorize_params ⇒ Object
- #raw_info ⇒ Object
- #request_phase ⇒ Object
- #user_email ⇒ Object
- #user_info ⇒ Object
- #user_name ⇒ Object
Instance Method Details
#authorize_params ⇒ Object
16 17 18 |
# File 'lib/omniauth/strategies/familysearch.rb', line 16 def super end |
#raw_info ⇒ Object
33 34 35 36 37 38 |
# File 'lib/omniauth/strategies/familysearch.rb', line 33 def raw_info @raw_info ||= access_token.get('/platform/users/current', :headers => { 'Accept' => 'application/x-fs-v1+json' }, :parse => :json ).parsed end |
#request_phase ⇒ Object
12 13 14 |
# File 'lib/omniauth/strategies/familysearch.rb', line 12 def request_phase super end |
#user_email ⇒ Object
48 49 50 |
# File 'lib/omniauth/strategies/familysearch.rb', line 48 def user_email user_info['email'] end |
#user_info ⇒ Object
40 41 42 |
# File 'lib/omniauth/strategies/familysearch.rb', line 40 def user_info @user_info ||= raw_info['users'] ? raw_info['users'].first : {} end |
#user_name ⇒ Object
44 45 46 |
# File 'lib/omniauth/strategies/familysearch.rb', line 44 def user_name user_info['contactName'] end |