Package org.keycloak.adapters
Class AdapterDeploymentContext
java.lang.Object
org.keycloak.adapters.AdapterDeploymentContext
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
This delegate is used to store temporary, per-request metadata like request resolved URLs. -
Field Summary
-
Constructor Summary
ConstructorDescriptionAdapterDeploymentContext
(KeycloakConfigResolver configResolver) For multi-tenant deployments, this constructor is to be used, as a KeycloakDeployment is not known at deployment time.AdapterDeploymentContext
(KeycloakDeployment deployment) For single-tenant deployments, this constructor is to be used, as a full KeycloakDeployment is known at deployment time and won't change during the application deployment's life cycle. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close
(org.apache.http.HttpResponse response) protected org.keycloak.common.util.KeycloakUriBuilder
getBaseBuilder
(HttpFacade facade, String base) resolveDeployment
(HttpFacade facade) For single-tenant deployments, it complements KeycloakDeployment by resolving a relative Auth Server's URL based on the current request For multi-tenant deployments, defers the resolution of KeycloakDeployment to the KeycloakConfigResolver .protected KeycloakDeployment
resolveUrls
(KeycloakDeployment deployment, HttpFacade facade) void
updateDeployment
(AdapterConfig config)
-
Field Details
-
deployment
-
configResolver
-
-
Constructor Details
-
AdapterDeploymentContext
public AdapterDeploymentContext() -
AdapterDeploymentContext
For single-tenant deployments, this constructor is to be used, as a full KeycloakDeployment is known at deployment time and won't change during the application deployment's life cycle.- Parameters:
deployment
- A KeycloakConfigResolver, possibly missing the Auth Server URL
-
AdapterDeploymentContext
For multi-tenant deployments, this constructor is to be used, as a KeycloakDeployment is not known at deployment time. It defers the resolution of a KeycloakDeployment to a KeycloakConfigResolver, to be implemented by the target application.- Parameters:
configResolver
- A KeycloakConfigResolver that will be used to resolve a KeycloakDeployment
-
-
Method Details
-
resolveDeployment
For single-tenant deployments, it complements KeycloakDeployment by resolving a relative Auth Server's URL based on the current request For multi-tenant deployments, defers the resolution of KeycloakDeployment to the KeycloakConfigResolver .- Parameters:
facade
- the Request/Response Façade , used to either determine the Auth Server URL (single tenant) or pass thru to the KeycloakConfigResolver.- Returns:
-
resolveUrls
-
getBaseBuilder
protected org.keycloak.common.util.KeycloakUriBuilder getBaseBuilder(HttpFacade facade, String base) -
close
protected void close(org.apache.http.HttpResponse response) -
updateDeployment
-