HaikuDepot: fix issue for user check

On startup the application will check a users' credentials work; if
not then it will log them out. This was broken after the move to
token-based authentication and this commit will fix that.

Change-Id: Ic9460b668422312ed5a856a92c5b99d9bd724801
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7056
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Andrew Lindesay 2023-10-19 21:39:20 +13:00 committed by waddlesplash
parent 338b492e0e
commit bf697877c1
3 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,6 @@ enum BitmapSize {
#define HD_CLIENT_TOO_OLD (HD_ERROR_BASE + 2)
#define HD_ERR_NOT_MODIFIED (HD_ERROR_BASE + 3)
#define HD_ERR_NO_DATA (HD_ERROR_BASE + 4)
#define HD_AUTHENTICATION_FAILED (HD_ERROR_BASE + 5)
#define REPOSITORY_NAME_SYSTEM "system"

View File

@ -104,6 +104,7 @@ UserDetailVerifierProcess::_TryFetchUserDetail(UserDetail& userDetail)
status_t result;
result = interface->RetrieveCurrentUserDetail(userDetailResponse);
if (result != B_OK) {
HDERROR("a problem has arisen retrieving the current user detail: %s",
strerror(result));

View File

@ -401,7 +401,7 @@ WebAppInterface::UnpackAccessToken(BMessage& responseEnvelopeMessage,
if (result != B_OK || token.IsEmpty()) {
HDINFO("failure to authenticate");
return HD_AUTHENTICATION_FAILED;
return B_PERMISSION_DENIED;
}
// The token should be present in three parts; the header, the claims and