Added ip to failed login log messages

This commit is contained in:
Lukas Metzger 2018-04-17 21:53:02 +02:00
parent b2cf655a88
commit d5e86f3583

View file

@ -54,7 +54,7 @@ class Sessions
'token' => $secretString
], 201);
} else {
$this->logger->info('User failed to authenticate', ['username' => $body['username']]);
$this->logger->info('User failed to authenticate', ['username' => $body['username'], 'ip' => $req->getAttribute('clientIp')]);
return $res->withJson(['error' => 'Username or password is invalid'], 403);
}
}