From bb942a0f85a7e2aaef68a78101beb675b3d3ce34 Mon Sep 17 00:00:00 2001 From: jostorey Date: Fri, 3 Nov 2023 12:20:28 -0700 Subject: [PATCH 1/2] Updated so when bceid singin, the username is sent to the backend --- backend/src/components/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/components/user.js b/backend/src/components/user.js index 9ab9bd5c..6853401a 100644 --- a/backend/src/components/user.js +++ b/backend/src/components/user.js @@ -76,9 +76,9 @@ async function getUserInfo(req, res) { return res.status(HttpStatus.OK).json(resData) } } else { - //Not an idir user, so just get the guid from the header - log.verbose('User Guid is: ', userGuid) - userResponse = await getUserProfile(userGuid, null) + // BCeID user + log.verbose('BCEID User guid: ' + userGuid + ' username: ' + userName) + userResponse = await getUserProfile(userGuid, userName) } if (log.isVerboseEnabled) { From 5e0504506b8db6249ac95fb9a722255a9e5a299e Mon Sep 17 00:00:00 2001 From: jostorey Date: Fri, 3 Nov 2023 13:51:19 -0700 Subject: [PATCH 2/2] Added comment explaining backend behaviour when bceid user guid not found. --- backend/src/components/user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/components/user.js b/backend/src/components/user.js index 6853401a..4f8f1b69 100644 --- a/backend/src/components/user.js +++ b/backend/src/components/user.js @@ -76,7 +76,8 @@ async function getUserInfo(req, res) { return res.status(HttpStatus.OK).json(resData) } } else { - // BCeID user + // This is a BCeID user: if the userGuid cannot be found in dyanmics, then dyanmics will check if the userName exists, + // if userName exists but has a null userGuid, the system will update the user record with the GUID and return that user profile. log.verbose('BCEID User guid: ' + userGuid + ' username: ' + userName) userResponse = await getUserProfile(userGuid, userName) }