Emit an error log when the app token login name does not match

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/28491/head
Christoph Wurst 3 years ago committed by backportbot[bot]
parent 33a5e7897d
commit face6b174b

@ -787,9 +787,14 @@ class Session implements IUserSession, Emitter {
// Check if login names match
if (!is_null($user) && $dbToken->getLoginName() !== $user) {
// TODO: this makes it imposssible to use different login names on browser and client
// TODO: this makes it impossible to use different login names on browser and client
// e.g. login by e-mail 'user@example.com' on browser for generating the token will not
// allow to use the client token with the login name 'user'.
$this->logger->error('App token login name does not match', [
'tokenLoginName' => $dbToken->getLoginName(),
'sessionLoginName' => $user,
]);
return false;
}

Loading…
Cancel
Save