Skip to content

Commit

Permalink
[CORRECTION][CONNEXION] Permets de se déconnecter après s’être connec…
Browse files Browse the repository at this point in the history
…té via le formulaire MonAideCyber
  • Loading branch information
bbougon committed Dec 31, 2024
1 parent ae2c794 commit ead3960
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions mon-aide-cyber-api/src/api/routesAPIAuthentification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const routesAPIAuthentification = (
.then((utilisateurAuthentifie: UtilisateurAuthentifie) => {
let reponseHATEOAS = constructeurActionsHATEOAS()
.pour({ contexte: 'aidant:acceder-aux-informations-utilisateur' })
.pour({ contexte: 'se-deconnecter' })
.construis();
return unServiceAidant(entrepots.aidants())
.parIdentifiant(utilisateurAuthentifie.identifiant)
Expand Down
10 changes: 10 additions & 0 deletions mon-aide-cyber-api/test/api/routesAPIAuthentification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ describe("Le serveur MAC, sur les routes d'authentification", () => {
url: '/api/aidant/preferences',
methode: 'GET',
},
'se-deconnecter': {
methode: 'DELETE',
typeAppel: 'API',
url: '/api/token',
},
},
});
const cookieRecu = (
Expand Down Expand Up @@ -131,6 +136,11 @@ describe("Le serveur MAC, sur les routes d'authentification", () => {
url: '/api/aidant/preferences',
methode: 'GET',
},
'se-deconnecter': {
methode: 'DELETE',
typeAppel: 'API',
url: '/api/token',
},
},
});
});
Expand Down

0 comments on commit ead3960

Please sign in to comment.