Class AdapterDeploymentContext


  • public class AdapterDeploymentContext
    extends Object
    Version:
    $Revision: 1 $
    Author:
    Bill Burke
    • 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:
      • 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)