public class AdapterDeploymentContext extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AdapterDeploymentContext.DeploymentDelegate
This delegate is used to store temporary, per-request metadata like request resolved URLs.
|
Modifier and Type | Field and Description |
---|---|
protected KeycloakConfigResolver |
configResolver |
protected KeycloakDeployment |
deployment |
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close(HttpResponse response) |
protected 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
and, if needed, will lazily resolve the Realm's Public Key.
|
void |
resolveRealmKey(KeycloakDeployment deployment) |
protected KeycloakDeployment |
resolveUrls(KeycloakDeployment deployment,
HttpFacade facade) |
void |
updateDeployment(AdapterConfig config) |
protected KeycloakDeployment deployment
protected KeycloakConfigResolver configResolver
public AdapterDeploymentContext()
public AdapterDeploymentContext(KeycloakDeployment deployment)
deployment
- A KeycloakConfigResolver, possibly missing the Auth
Server URL and/or Realm Public Keypublic AdapterDeploymentContext(KeycloakConfigResolver configResolver)
configResolver
- A KeycloakConfigResolver that will be used
to resolve a KeycloakDeploymentpublic KeycloakDeployment resolveDeployment(HttpFacade facade)
facade
- the Request/Response Façade , used to either determine
the Auth Server URL (single tenant) or pass thru to the
KeycloakConfigResolver.protected KeycloakDeployment resolveUrls(KeycloakDeployment deployment, HttpFacade facade)
public void resolveRealmKey(KeycloakDeployment deployment)
protected KeycloakUriBuilder getBaseBuilder(HttpFacade facade, String base)
protected void close(HttpResponse response)
public void updateDeployment(AdapterConfig config)
Copyright © 2016 JBoss by Red Hat. All rights reserved.