ask for amr (Authentication Methods References)
This commit is contained in:
parent
1e9982927a
commit
5f25756ae2
1 changed files with 6 additions and 2 deletions
|
@ -17,7 +17,9 @@ class AgentConnectService
|
|||
scope: [:openid, :email, :given_name, :usual_name, :organizational_unit, :belonging_population, :siret, :idp_id],
|
||||
state:,
|
||||
nonce:,
|
||||
acr_values: 'eidas1'
|
||||
acr_values: 'eidas1',
|
||||
claims: { id_token: { amr: { essential: true } } }.to_json,
|
||||
prompt: :login
|
||||
)
|
||||
|
||||
[uri, state, nonce]
|
||||
|
@ -32,7 +34,9 @@ class AgentConnectService
|
|||
id_token = ResponseObject::IdToken.decode(access_token.id_token, conf[:jwks])
|
||||
id_token.verify!(conf.merge(nonce: nonce))
|
||||
|
||||
[access_token.userinfo!.raw_attributes, access_token.id_token]
|
||||
amr = id_token.amr.present? ? JSON.parse(id_token.amr) : []
|
||||
|
||||
[access_token.userinfo!.raw_attributes, access_token.id_token, amr]
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue