Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,28 @@ const getAuthorizationControllerFactory = (params, options) => {

app.post("/login", getAuthorizationControllerFactory());

app.post(
"/login-full-acr",
getAuthorizationControllerFactory({
claims: {
id_token: {
amr: { essential: true },
acr: {
essential: true,
values: [
"eidas0",
"eidas0-mfa",
"eidas1",
"eidas1-mfa",
"eidas2",
"eidas3",
],
},
},
},
}),
);

app.post(
"/select-organization",
getAuthorizationControllerFactory({
Expand Down Expand Up @@ -157,7 +179,9 @@ app.post(
amr: { essential: true },
acr: {
essential: true,
values: process.env.ACR_VALUES_FOR_MFA ? process.env.ACR_VALUES_FOR_MFA.split(",") : null,
values: process.env.ACR_VALUES_FOR_MFA
? process.env.ACR_VALUES_FOR_MFA.split(",")
: null,
},
},
},
Expand Down
20 changes: 12 additions & 8 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@
<button id="logout">Se déconnecter</button>
</form>
<br>
<form action="/login-full-acr" method="post">
<button id="login-full-acr">Connexion - implémentation Fournisseur d’Identité</button>
</form>
<br>
<form action="/force-2fa" method="post">
<button id="force-2fa">Forcer une connexion a deux facteurs</button>
</form>
<br>
<form action="/force-certification-dirigeant" method="post">
<button id="force-certification-dirigeant">Forcer une connexion par certification dirigeant</button>
</form>
<br>
<% if (locals.showBetaFeatures) { %>
<form action="/select-organization" method="post">
<button id="select-organization">Changer d’organisation</button>
Expand All @@ -85,14 +97,6 @@
<button id="force-login">Forcer une reconnexion</button>
</form>
<br>
<form action="/force-2fa" method="post">
<button id="force-2fa">Forcer une connexion a deux facteurs</button>
</form>
<br>
<form action="/force-certification-dirigeant" method="post">
<button id="force-certification-dirigeant">Forcer une connexion par certification dirigeant</button>
</form>
<br>
<% } %>
<details>
<summary id="open-custom-configuration">Usage avancé</summary>
Expand Down