From 8cc7e81075eb8b84e9fddb75e26bae1be59a7108 Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Tue, 2 Aug 2022 14:10:46 +0200 Subject: [PATCH] feat: throw login fail if pdl doesn't match --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 1303284..a8158f0 100644 --- a/src/index.js +++ b/src/index.js @@ -137,7 +137,7 @@ async function verifyUserIdentity( if (fields.pointId != pdl) { log('error', 'PointId does not match') - return false + throw errors.LOGIN_FAILED } return true } @@ -502,7 +502,6 @@ async function findUserPdl( log('error', 'rechercherPointResponse') log('error', err) throw errors.LOGIN_FAILED - //TODO: handling code error SGT4F6 and SGT432 into USER_ACTIon_NEEDED }) const parsedReply = await xml2js.parseStringPromise(response.body, { -- GitLab