From 45ce27472186c0660dcb981c156efc859a9b20a5 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Fri, 19 Nov 2021 12:01:27 +0100 Subject: [PATCH] add agent connect secrets --- config/env.example | 6 ++++++ config/initializers/agent_connect.rb | 1 + config/secrets.yml | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 config/initializers/agent_connect.rb diff --git a/config/env.example b/config/env.example index 48266c857..d959bd33d 100644 --- a/config/env.example +++ b/config/env.example @@ -45,6 +45,12 @@ FC_PARTICULIER_ID="" FC_PARTICULIER_SECRET="" FC_PARTICULIER_BASE_URL="" +# Service externe: authentification Agent Connect +AGENT_CONNECT_ID="" +AGENT_CONNECT_SECRET="" +AGENT_CONNECT_BASE_URL="" +AGENT_CONNECT_JWKS="" + # Service externe: Support Utilisateur HelpScout | Spécifique démarches-simplifiées.fr HELPSCOUT_MAILBOX_ID="" HELPSCOUT_CLIENT_ID="" diff --git a/config/initializers/agent_connect.rb b/config/initializers/agent_connect.rb new file mode 100644 index 000000000..1e9f1d32c --- /dev/null +++ b/config/initializers/agent_connect.rb @@ -0,0 +1 @@ +AGENT_CONNECT = Rails.application.secrets.agent_connect diff --git a/config/secrets.yml b/config/secrets.yml index 1199d404a..d6c545141 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -25,6 +25,14 @@ defaults: &defaults token_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/token userinfo_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/userinfo logout_endpoint: <%= ENV['FC_PARTICULIER_BASE_URL'] %>/api/v1/logout + agent_connect: + identifier: <%= ENV['AGENT_CONNECT_ID'] %> + secret: <%= ENV['AGENT_CONNECT_SECRET'] %> + redirect_uri: http://test.localhost:3000/agent_connect/callback + authorization_endpoint: <%= ENV['AGENT_CONNECT_BASE_URL'] %>/api/v2/authorize + token_endpoint: <%= ENV['AGENT_CONNECT_BASE_URL'] %>/api/v2/token + userinfo_endpoint: <%= ENV['AGENT_CONNECT_BASE_URL'] %>/api/v2/userinfo + logout_endpoint: <%= ENV['AGENT_CONNECT_BASE_URL'] %>/api/v2/session/end mailjet: api_key: <%= ENV['MAILJET_API_KEY'] %> secret_key: <%= ENV['MAILJET_SECRET_KEY'] %>