[KEYCLOAK-10334] Keycloak Spring Boot Adapter shares configuration in static field
Signed-off-by: Nils Christian Ehmke <nils-christian.ehmke@bmiag.de>
This commit is contained in:
parent
11c9684e7d
commit
a58a0e7678
3 changed files with 8 additions and 8 deletions
|
@ -50,9 +50,9 @@ public class KeycloakBaseSpringBootConfiguration {
|
|||
protected KeycloakSpringBootProperties keycloakProperties;
|
||||
|
||||
@Autowired
|
||||
public void setKeycloakSpringBootProperties(KeycloakSpringBootProperties keycloakProperties) {
|
||||
public void setKeycloakSpringBootProperties(KeycloakSpringBootProperties keycloakProperties, KeycloakSpringBootConfigResolver resolver) {
|
||||
this.keycloakProperties = keycloakProperties;
|
||||
KeycloakSpringBootConfigResolver.setAdapterConfig(keycloakProperties);
|
||||
resolver.setAdapterConfig(keycloakProperties);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -26,7 +26,7 @@ public class KeycloakSpringBootConfigResolver implements org.keycloak.adapters.K
|
|||
|
||||
private KeycloakDeployment keycloakDeployment;
|
||||
|
||||
private static AdapterConfig adapterConfig;
|
||||
private AdapterConfig adapterConfig;
|
||||
|
||||
@Override
|
||||
public KeycloakDeployment resolve(OIDCHttpFacade.Request request) {
|
||||
|
@ -34,12 +34,12 @@ public class KeycloakSpringBootConfigResolver implements org.keycloak.adapters.K
|
|||
return keycloakDeployment;
|
||||
}
|
||||
|
||||
keycloakDeployment = KeycloakDeploymentBuilder.build(KeycloakSpringBootConfigResolver.adapterConfig);
|
||||
keycloakDeployment = KeycloakDeploymentBuilder.build(adapterConfig);
|
||||
|
||||
return keycloakDeployment;
|
||||
}
|
||||
|
||||
static void setAdapterConfig(AdapterConfig adapterConfig) {
|
||||
KeycloakSpringBootConfigResolver.adapterConfig = adapterConfig;
|
||||
void setAdapterConfig(AdapterConfig adapterConfig) {
|
||||
this.adapterConfig = adapterConfig;
|
||||
}
|
||||
}
|
|
@ -50,9 +50,9 @@ public class KeycloakAutoConfiguration extends KeycloakBaseSpringBootConfigurati
|
|||
private KeycloakSpringBootProperties keycloakProperties;
|
||||
|
||||
@Autowired
|
||||
public void setKeycloakSpringBootProperties(KeycloakSpringBootProperties keycloakProperties) {
|
||||
public void setKeycloakSpringBootProperties(KeycloakSpringBootProperties keycloakProperties, KeycloakSpringBootConfigResolver resolver) {
|
||||
this.keycloakProperties = keycloakProperties;
|
||||
KeycloakSpringBootConfigResolver.setAdapterConfig(keycloakProperties);
|
||||
resolver.setAdapterConfig(keycloakProperties);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue