use of org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver in project vboard by voyages-sncf-technologies.
the class WebSecurityConfig method adapterDeploymentContext.
// Also injected in `KeycloakPreAuthActionsFilter` as the `deploymentContext` property through the `initFilterBean` method.
// !BEWARE! if this `deploymentContext` property ends up null, it will lead to a NullPointerException in `org.keycloak.adapters.PreAuthActionsHandler.preflightCors:107`
@Bean
@Conditional(KeycloakEnabledInEnv.class)
public static AdapterDeploymentContext adapterDeploymentContext() throws Exception {
AdapterDeploymentContextFactoryBean factoryBean = new AdapterDeploymentContextFactoryBean(new KeycloakSpringBootConfigResolver());
// creates the AdapterDeploymentContext
factoryBean.afterPropertiesSet();
return factoryBean.getObject();
}
Aggregations