Skip to content

Commit

Permalink
Transmets date naissance à OOTS-France
Browse files Browse the repository at this point in the history
  • Loading branch information
egaillot committed Dec 27, 2024
1 parent b446a92 commit 8cdaca7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/modeles/sessionFCPlus.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ class SessionFCPlus {
])
.then(([jwt, url]) => this.adaptateurChiffrement.verifieSignatureJWTDepuisJWKS(jwt, url))
.then((infosDechiffrees) => ({
prenom: infosDechiffrees.given_name,
dateNaissance: infosDechiffrees.birthdate,
nomUsage: infosDechiffrees.family_name,
prenom: infosDechiffrees.given_name,
nonce: this.nonce,
}))
.catch((e) => Promise.reject(new ErreurEchecAuthentification(e.message)));
Expand Down
3 changes: 2 additions & 1 deletion test/modeles/sessionFCPlus.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Une session FranceConnect+', () => {
try {
expect(jwt).toBe('aaa');
expect(url).toBe('http://example.com');
return Promise.resolve({ given_name: 'Anne', family_name: 'Durand' });
return Promise.resolve({ given_name: 'Anne', family_name: 'Durand', birthdate: '1972-11-25' });
} catch (e) {
return Promise.reject(e);
}
Expand All @@ -99,6 +99,7 @@ describe('Une session FranceConnect+', () => {
.then((json) => {
expect(json).toHaveProperty('prenom', 'Anne');
expect(json).toHaveProperty('nomUsage', 'Durand');
expect(json).toHaveProperty('dateNaissance', '1972-11-25');
});
});

Expand Down

0 comments on commit 8cdaca7

Please sign in to comment.