Class SamRegistrationInstaller

java.lang.Object
org.wildfly.security.soteria.original.SamRegistrationInstaller
All Implemented Interfaces:
jakarta.servlet.ServletContainerInitializer, jakarta.servlet.ServletContextListener, EventListener

public class SamRegistrationInstaller extends Object implements jakarta.servlet.ServletContainerInitializer, jakarta.servlet.ServletContextListener
If an HttpAuthenticationMechanism implementation has been found on the classpath, this initializer installs a bridge SAM that delegates the validateRequest, secureResponse and cleanSubject methods from the SAM to the HttpAuthenticationMechanism.

The bridge SAM uses CDI.current() to obtain the HttpAuthenticationMechanism, therefore fully enabling CDI in the implementation of that interface.

Author:
Arjan Tijms
  • Constructor Details

    • SamRegistrationInstaller

      public SamRegistrationInstaller()
  • Method Details

    • onStartup

      public void onStartup(Set<Class<?>> c, jakarta.servlet.ServletContext ctx) throws jakarta.servlet.ServletException
      Specified by:
      onStartup in interface jakarta.servlet.ServletContainerInitializer
      Throws:
      jakarta.servlet.ServletException
    • contextDestroyed

      public void contextDestroyed(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextDestroyed in interface jakarta.servlet.ServletContextListener