public class KeycloakConfigurationServletListener extends Object implements javax.servlet.ServletContextListener
A ServletContextListener
that parses the keycloak adapter configuration and set the same configuration
as a ServletContext
attribute in order to provide to KeycloakHttpServerAuthenticationMechanism
a way
to obtain the configuration when processing requests.
This listener should be automatically registered to a deployment using the subsystem.
Modifier and Type | Field and Description |
---|---|
static String |
ADAPTER_DEPLOYMENT_CONTEXT_ATTRIBUTE |
static String |
ADAPTER_DEPLOYMENT_CONTEXT_ATTRIBUTE_ELYTRON |
static String |
ADAPTER_SESSION_ID_MAPPER_ATTRIBUTE_ELYTRON |
static String |
ADAPTER_SESSION_ID_MAPPER_UPDATER_ATTRIBUTE_ELYTRON |
protected static org.jboss.logging.Logger |
log |
Constructor and Description |
---|
KeycloakConfigurationServletListener() |
Modifier and Type | Method and Description |
---|---|
void |
addTokenStoreUpdaters(javax.servlet.ServletContext servletContext) |
void |
contextDestroyed(javax.servlet.ServletContextEvent sce) |
void |
contextInitialized(javax.servlet.ServletContextEvent sce) |
SessionIdMapperUpdater |
getIdMapperUpdater() |
protected void |
setIdMapperUpdater(SessionIdMapperUpdater idMapperUpdater) |
protected static org.jboss.logging.Logger log
public static final String ADAPTER_DEPLOYMENT_CONTEXT_ATTRIBUTE
public static final String ADAPTER_DEPLOYMENT_CONTEXT_ATTRIBUTE_ELYTRON
public static final String ADAPTER_SESSION_ID_MAPPER_ATTRIBUTE_ELYTRON
public static final String ADAPTER_SESSION_ID_MAPPER_UPDATER_ATTRIBUTE_ELYTRON
public KeycloakConfigurationServletListener()
public void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
contextDestroyed
in interface javax.servlet.ServletContextListener
public void addTokenStoreUpdaters(javax.servlet.ServletContext servletContext)
public SessionIdMapperUpdater getIdMapperUpdater()
protected void setIdMapperUpdater(SessionIdMapperUpdater idMapperUpdater)
Copyright © 2020 JBoss by Red Hat. All rights reserved.