Merge pull request #7654 from betagouv/fix-agent-connect-service

fix(agent_connect): constant path
This commit is contained in:
Colin Darie 2022-08-03 10:27:38 +02:00 committed by GitHub
commit 8b962b4624
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ class AgentConnectService
id_token = ResponseObject::IdToken.decode(access_token.id_token, discover.jwks)
id_token.verify!(
client_id: AGENT_CONNECT[:identifier],
client_id: Rails.application.secrets.agent_connect[:identifier],
issuer: discover.issuer,
nonce: nonce
)
@ -43,6 +43,6 @@ class AgentConnectService
private
def self.find_discover
Discovery::Provider::Config.discover!("#{AGENT_CONNECT_BASE_URL}/api/v2")
Discovery::Provider::Config.discover!("#{ENV.fetch('AGENT_CONNECT_BASE_URL')}/api/v2")
end
end