Class JASPICWebListenerHelper


  • public class JASPICWebListenerHelper
    extends Object
    This is a helper class used to provide a simple mechanism to deploy a custom ServerAuthenticationModule (SAM) into Payara during deployment of an .application This WebListener should be called by a ServletContextListener. If you want to pass custom properties to your ServerAuthenticationModule you can create ServletContext initialiser parameters and these are all passed to your SAM as properties. Your SAM must be thread safe as only one instance will be created and initialize will be called before every validateRequest
    Author:
    steve
    • Field Detail

      • SAM_PER_REQUEST_PROPERTY

        public static final String SAM_PER_REQUEST_PROPERTY
        Use this servlet context initialiser property to define whether a new instance of your SAM is created on each request or only a single instance is created.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JASPICWebListenerHelper

        public JASPICWebListenerHelper()
    • Method Detail

      • registerSAM

        public void registerSAM​(Class samClass,
                                jakarta.servlet.ServletContextEvent sce,
                                String samDescription)
        Call register in the contextInitialised method of your ServletContextListener
        Parameters:
        samClass - The class of your ServerAuthenitcationModule
        sce - The ServletContextEvent received by your ServletContextListener.
        samDescription - A description for your SAM
      • deregisterSAM

        public void deregisterSAM()
        Call this method in the contextDestroyed method of your ServletContextListener