9e0dfb593e
Reactivate FranceConnect Entreprise
20 lines
647 B
Ruby
20 lines
647 B
Ruby
class FranceConnectService
|
|
def self.retrieve_user_informations_entreprise code
|
|
client = FranceConnectEntrepriseClient.new code: code
|
|
|
|
access_token = client.access_token!(client_auth_method: :secret)
|
|
user_info = access_token.userinfo!
|
|
Hashie::Mash.new user_info.raw_attributes
|
|
end
|
|
|
|
def self.retrieve_user_informations_particulier code
|
|
client = FranceConnectParticulierClient.new code: code
|
|
|
|
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
|
|
end
|