Class: OmniAuth::Strategies::FamilySearch

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/familysearch.rb

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



16
17
18
# File 'lib/omniauth/strategies/familysearch.rb', line 16

def authorize_params
  super
end

#raw_infoObject



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_phaseObject



12
13
14
# File 'lib/omniauth/strategies/familysearch.rb', line 12

def request_phase
  super
end

#user_emailObject



48
49
50
# File 'lib/omniauth/strategies/familysearch.rb', line 48

def user_email
  ['email']
end

#user_infoObject



40
41
42
# File 'lib/omniauth/strategies/familysearch.rb', line 40

def 
  @user_info ||= raw_info['users'] ? raw_info['users'].first : {}
end

#user_nameObject



44
45
46
# File 'lib/omniauth/strategies/familysearch.rb', line 44

def user_name
  ['contactName']
end