Throw "401 Unauthenticated" when authentication is provided but invalid

E.g. with an AppToken that has been revoked

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-04-15 13:02:59 +02:00
parent a011b7021e
commit 521bb30541
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 2 additions and 0 deletions

View File

@ -599,6 +599,8 @@ class Session implements IUserSession, Emitter {
return true;
}
// If credentials were provided, they need to be valid, otherwise we do boom
throw new LoginException();
} catch (PasswordLoginForbiddenException $ex) {
// Nothing to do
}