2015-10-06 11:21:20 +02:00
|
|
|
class FranceConnectService
|
2015-12-24 10:12:23 +01:00
|
|
|
def self.retrieve_user_informations_particulier code
|
2018-01-11 11:07:25 +01:00
|
|
|
client = FranceConnectParticulierClient.new(code)
|
2015-12-24 10:12:23 +01:00
|
|
|
|
|
|
|
access_token = client.access_token!(client_auth_method: :secret)
|
|
|
|
user_info = access_token.userinfo!
|
|
|
|
hash = Hashie::Mash.new user_info.raw_attributes
|
|
|
|
|
|
|
|
hash.france_connect_particulier_id = hash.sub
|
|
|
|
hash
|
|
|
|
end
|
2015-10-06 11:21:20 +02:00
|
|
|
end
|