Merge pull request #4033 from sebastienblanc/KEYCLOAK-3818
KEYCLOAK-3818 : safer method to retrieve the webcontext for jetty
This commit is contained in:
commit
b45089f5f0
1 changed files with 4 additions and 0 deletions
|
@ -210,6 +210,10 @@ public class KeycloakSpringBootConfiguration {
|
|||
}
|
||||
|
||||
WebAppContext webAppContext = server.getBean(WebAppContext.class);
|
||||
//if not found as registered bean let's try the handler
|
||||
if(webAppContext==null){
|
||||
webAppContext = (WebAppContext) server.getHandler();
|
||||
}
|
||||
|
||||
ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
|
||||
securityHandler.setConstraintMappings(jettyConstraintMappings);
|
||||
|
|
Loading…
Reference in a new issue