Continue with security impl, starting to gell....

This commit is contained in:
Admin
2017-03-29 16:41:59 -05:00
parent 7442b0d0ca
commit ba621fcb85
6 changed files with 206 additions and 33 deletions

View File

@@ -61,10 +61,12 @@ public class SystemControl extends AuthFramework {
log.info("System control service started....");
before(SYSTEM_CONTEXT + "/*", (request, response) -> {
if(bridgeSettings.getBridgeSecurity().isSecure()) {
String pathInfo = request.pathInfo();
if(pathInfo == null || !pathInfo.equals(SYSTEM_CONTEXT + "/login")) {
User authUser = getAuthenticatedUser(request);
if(authUser == null) {
response.redirect("/login", 301);
// halt(401, "You are not logged in....");
halt(401, "{\"message\":\"User not authenticated\"}");
}
}
}
});