Package org.keycloak.adapters
Class AdapterDeploymentContext
- java.lang.Object
-
- org.keycloak.adapters.AdapterDeploymentContext
-
public class AdapterDeploymentContext extends Object
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AdapterDeploymentContext.DeploymentDelegate
This delegate is used to store temporary, per-request metadata like request resolved URLs.
-
Field Summary
Fields Modifier and Type Field Description protected KeycloakConfigResolver
configResolver
protected KeycloakDeployment
deployment
-
Constructor Summary
Constructors Constructor Description AdapterDeploymentContext()
AdapterDeploymentContext(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close(org.apache.http.HttpResponse response)
protected org.keycloak.common.util.KeycloakUriBuilder
getBaseBuilder(HttpFacade facade, String base)
KeycloakDeployment
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 Detail
-
deployment
protected KeycloakDeployment deployment
-
configResolver
protected KeycloakConfigResolver configResolver
-
-
Constructor Detail
-
AdapterDeploymentContext
public AdapterDeploymentContext()
-
AdapterDeploymentContext
public 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.- Parameters:
deployment
- A KeycloakConfigResolver, possibly missing the Auth Server URL
-
AdapterDeploymentContext
public AdapterDeploymentContext(KeycloakConfigResolver configResolver)
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 Detail
-
resolveDeployment
public KeycloakDeployment 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 .- 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
protected KeycloakDeployment resolveUrls(KeycloakDeployment deployment, HttpFacade facade)
-
getBaseBuilder
protected org.keycloak.common.util.KeycloakUriBuilder getBaseBuilder(HttpFacade facade, String base)
-
close
protected void close(org.apache.http.HttpResponse response)
-
updateDeployment
public void updateDeployment(AdapterConfig config)
-
-