Log denied requests due to invalid credentials in AS

This commit is contained in:
Max Dor
2019-05-04 11:16:19 +02:00
parent 44a80461a0
commit 25968e0737

View File

@@ -176,10 +176,12 @@ public class AppSvcManager {
ensureEnabled();
if (StringUtils.isBlank(token)) {
log.info("Denying request without a HS token");
throw new HttpMatrixException(401, "M_UNAUTHORIZED", "No HS token");
}
if (!StringUtils.equals(cfg.getEndpoint().getToAS().getToken(), token)) {
log.info("Denying request with an invalid HS token");
throw new NotAllowedException("Invalid HS token");
}