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:
parent
338b492e0e
commit
bf697877c1
@ -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"
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user