Skip to content

Commit

Permalink
refactor: removed dedicated clients as they are now configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
rdubigny committed Oct 21, 2024
1 parent a3b7e31 commit 07f5cb4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 42 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
- redirect_after_session_expiration
- reset_password
- set_info_after_account_provisioning
- signin_from_legacy_client
- signin_from_proconnect_federation_client
- signin_from_standard_client
- signin_with_email_verification_renewal
- signin_with_legacy_scope
- signin_with_magic_link
- signin_with_right_acr
- signin_with_totp
Expand Down Expand Up @@ -86,18 +86,6 @@ jobs:
STYLESHEET_URL: ""
LOGIN_HINT: [email protected]
ACR_VALUES: eidas1
moncomptepro-legacy-client:
image: ghcr.io/numerique-gouv/moncomptepro-test-client
ports:
- 4002:3000
env:
SITE_TITLE: moncomptepro-legacy-client
HOST: http://localhost:4002
MCP_CLIENT_ID: legacy_client_id
MCP_CLIENT_SECRET: legacy_client_secret
MCP_PROVIDER: ${{ env.MONCOMPTEPRO_HOST }}
MCP_SCOPES: openid email profile phone organizations
STYLESHEET_URL: ""
redis:
image: redis:7.2
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,14 @@ INSERT INTO oidc_clients
userinfo_signed_response_alg, id_token_signed_response_alg,
authorization_signed_response_alg, introspection_signed_response_alg)
VALUES
('Oidc Test Client',
'legacy_client_id',
'legacy_client_secret',
ARRAY [
'http://localhost:4002/login-callback'
],
ARRAY []::varchar[],
'openid email profile phone organizations',
'http://localhost:4002/',
'MonComptePro test client. More info: https://github.com/numerique-gouv/moncomptepro-test-client.',
null, null, null, null),
('Oidc Test Client',
'standard_client_id',
'standard_client_secret',
ARRAY [
'http://localhost:4000/login-callback'
],
ARRAY []::varchar[],
'openid email profile organization',
'openid email profile phone organization organizations',
'http://localhost:4000/',
'MonComptePro test client. More info: https://github.com/numerique-gouv/moncomptepro-test-client.',
null, null, null, null);
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
//

describe("sign-in from legacy client", () => {
describe("sign-in with legacy scope", () => {
it("should sign-in", function () {
cy.visit("http://localhost:4002");
cy.get("button.proconnect-button").click();
cy.visit("http://localhost:4000");
cy.setCustomParams({
scope: "openid email profile phone organizations",
});
cy.get("button#custom-connection").click({ force: true });

cy.login("[email protected]");

cy.contains("moncomptepro-legacy-client");
cy.contains("moncomptepro-standard-client");
cy.contains("[email protected]");
cy.contains("Commune de lamalou-les-bains");

Expand Down
13 changes: 0 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,6 @@ services:
ACR_VALUES: eidas1
network_mode: "host"

moncomptepro-legacy-client:
image: ghcr.io/numerique-gouv/moncomptepro-test-client
environment:
PORT: 4002
SITE_TITLE: moncomptepro-legacy-client
HOST: http://localhost:4002
MCP_CLIENT_ID: legacy_client_id
MCP_CLIENT_SECRET: legacy_client_secret
MCP_PROVIDER: http://localhost:3000
MCP_SCOPES: openid email profile phone organizations
STYLESHEET_URL:
network_mode: "host"

maildev:
image: soulteary/maildev
network_mode: "host"
Expand Down

0 comments on commit 07f5cb4

Please sign in to comment.