2021-11-19 10:00:04 +01:00
|
|
|
class AgentConnectService
|
|
|
|
def self.enabled?
|
|
|
|
ENV.fetch("AGENT_CONNECT_ENABLED", "enabled") == "enabled"
|
|
|
|
end
|
2021-11-19 10:21:47 +01:00
|
|
|
|
|
|
|
def self.authorization_uri
|
|
|
|
client = AgentConnectClient.new
|
|
|
|
|
|
|
|
client.authorization_uri(
|
|
|
|
scope: [:openid, :email],
|
|
|
|
state: SecureRandom.hex(16),
|
|
|
|
nonce: SecureRandom.hex(16),
|
|
|
|
acr_values: 'eidas1'
|
|
|
|
)
|
|
|
|
end
|
2021-11-19 10:00:04 +01:00
|
|
|
end
|