Class PolicyEnforcerServletContextListener
java.lang.Object
org.keycloak.adapters.authorization.integration.elytron.PolicyEnforcerServletContextListener
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener,EventListener
@WebListener
public class PolicyEnforcerServletContextListener
extends Object
implements jakarta.servlet.ServletContextListener
A
ServletContextListener to programmatically configure the ServletContext in order to
enable the policy enforcer.
By default, the policy enforcer configuration is loaded from a file at WEB-INF/policy-enforcer.json.
Applications can also dynamically resolve the configuration by implementing the ConfigurationResolver SPI. For that,
make sure to create a {@link META-INF/services/org.keycloak.adapters.authorization.spi.ConfigurationResolver} to register
the implementation.- Author:
- Pedro Igor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextInitialized(jakarta.servlet.ServletContextEvent sce) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.ServletContextListener
contextDestroyed
-
Constructor Details
-
PolicyEnforcerServletContextListener
public PolicyEnforcerServletContextListener()
-
-
Method Details
-
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent sce) - Specified by:
contextInitializedin interfacejakarta.servlet.ServletContextListener
-