feat(file retrieval): attach agent_connect_information to instructeur

This commit is contained in:
simon lehericey 2023-12-12 15:02:22 +01:00
parent 277ac1259a
commit c1199af83d
2 changed files with 6 additions and 3 deletions

View file

@ -35,6 +35,9 @@ class AgentConnect::AgentController < ApplicationController
instructeur.update(agent_connect_id: user_info['sub'])
end
aci = AgentConnectInformation.find_or_initialize_by(instructeur:)
aci.update(user_info.slice('given_name', 'usual_name', 'email', 'sub', 'siret', 'organizational_unit', 'belonging_population', 'phone'))
sign_in(:user, instructeur.user)
redirect_to instructeur_procedures_path

View file

@ -12,9 +12,9 @@ class AgentConnectService
nonce = SecureRandom.hex(16)
uri = client.authorization_uri(
scope: [:openid, :email],
state: state,
nonce: nonce,
scope: [:openid, :email, :given_name, :usual_name, :organizational_unit, :belonging_population, :siret],
state:,
nonce:,
acr_values: 'eidas1'
)