Merge pull request #521 from stianst/master
KEYCLOAK-556 NullPointerException in project-integrations example on Wil...
This commit is contained in:
commit
1f2db2c049
2 changed files with 12 additions and 1 deletions
|
@ -99,12 +99,14 @@ public class KeycloakServletExtension implements ServletExtension {
|
|||
InputStream is = getConfigInputStream(servletContext);
|
||||
KeycloakDeployment deployment = null;
|
||||
if (is == null) {
|
||||
throw new RuntimeException("Unable to find realm config in /WEB-INF/keycloak.json or in keycloak subsystem.");
|
||||
log.warn("No adapter configuration. Keycloak is unconfigured and will deny all requests.");
|
||||
deployment = new KeycloakDeployment();
|
||||
} else {
|
||||
deployment = KeycloakDeploymentBuilder.build(is);
|
||||
|
||||
}
|
||||
AdapterDeploymentContext deploymentContext = new AdapterDeploymentContext(deployment);
|
||||
servletContext.setAttribute(AdapterDeploymentContext.class.getName(), deploymentContext);
|
||||
UndertowUserSessionManagement userSessionManagement = new UndertowUserSessionManagement();
|
||||
final ServletKeycloakAuthMech mech = createAuthenticationMechanism(deploymentInfo, deploymentContext, userSessionManagement);
|
||||
|
||||
|
|
|
@ -2,10 +2,19 @@
|
|||
<deployment>
|
||||
<dependencies>
|
||||
<module name="org.apache.httpcomponents"/>
|
||||
<module name="org.bouncycastle"/>
|
||||
<module name="org.jboss.resteasy.resteasy-jackson-provider" services="import"/>
|
||||
<module name="org.codehaus.jackson.jackson-core-asl"/>
|
||||
<module name="org.codehaus.jackson.jackson-mapper-asl"/>
|
||||
</dependencies>
|
||||
<exclusions>
|
||||
<module name="org.jboss.resteasy.resteasy-jackson2-provider"/>
|
||||
|
||||
<!-- Exclude keycloak modules -->
|
||||
<module name="org.keycloak.keycloak-core" />
|
||||
<module name="org.keycloak.keycloak-adapter-core" />
|
||||
<module name="org.keycloak.keycloak-undertow-adapter" />
|
||||
<module name="org.keycloak.keycloak-as7-adapter" />
|
||||
</exclusions>
|
||||
</deployment>
|
||||
</jboss-deployment-structure>
|
Loading…
Reference in a new issue