Skip to content

Commit

Permalink
Fix the wildfly issue when AuthenticationFilter and UserServlet could…
Browse files Browse the repository at this point in the history
… return different values for 'authenticationEnabled'
  • Loading branch information
mposolda committed Feb 2, 2015
1 parent e2e8cb9 commit c63ad45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions hawtio-system/src/main/java/io/hawt/web/UserServlet.java
Expand Up @@ -23,6 +23,11 @@ public class UserServlet extends HttpServlet {
public void init(ServletConfig servletConfig) throws ServletException {
config = (ConfigManager) servletConfig.getServletContext().getAttribute("ConfigManager");
this.authenticationEnabled = Boolean.parseBoolean(config.get("authenticationEnabled", "true"));

// JVM system properties can override always
if (System.getProperty(AuthenticationFilter.HAWTIO_AUTHENTICATION_ENABLED) != null) {
this.authenticationEnabled = Boolean.getBoolean(AuthenticationFilter.HAWTIO_AUTHENTICATION_ENABLED);
}
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/core/js/keycloakLogin.ts
Expand Up @@ -6,7 +6,7 @@ module Core {

var log = Logger.get('Keycloak');

log.setLevel(Logger.DEBUG);
// log.setLevel(Logger.DEBUG);

var checkKeycloakEnabled = function(callback: Function) {
var keycloakEnabledUrl: string = "keycloak/enabled";
Expand Down

0 comments on commit c63ad45

Please sign in to comment.