safer method to retrieve the webcontext for jetty

This commit is contained in:
sebastienblanc 2017-04-11 18:20:47 +02:00
parent 00b832b1cd
commit a011f44d39

View file

@ -209,7 +209,7 @@ public class KeycloakSpringBootConfiguration {
}
}
WebAppContext webAppContext = server.getBean(WebAppContext.class);
WebAppContext webAppContext = (WebAppContext) server.getHandler();
ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
securityHandler.setConstraintMappings(jettyConstraintMappings);