private HttpHandler createAuthenticationHandlersChain(HttpHandler next, AuthenticationConfiguration authConfig) { HttpHandler authenticationCallHandler = new AuthenticationCallHandler(next); HttpHandler constraintHandler = new AuthenticationPredicateAwareConstraintHandler( authenticationCallHandler, authConfig.getIsAuthenticationRequiredPredicate()); HttpHandler mechanismsHandler = new AuthenticationMechanismsHandler(constraintHandler, authConfig.getAuthMechanisms()); AuthenticationMode authenticationMode = AuthenticationMode.valueOf( configFactory.getStringProperty(Configs.FRONTEND_AUTHENTICATION_MODE).toUpperCase()); return new SecurityInitialHandler(authenticationMode, authConfig.getIdentityManager(), mechanismsHandler); }