Package fish.payara.security.jaspic
Class JASPICWebListenerHelper
- java.lang.Object
-
- fish.payara.security.jaspic.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 Summary
Fields Modifier and Type Field Description static 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.
-
Constructor Summary
Constructors Constructor Description JASPICWebListenerHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deregisterSAM()
Call this method in the contextDestroyed method of your ServletContextListenervoid
registerSAM(Class samClass, jakarta.servlet.ServletContextEvent sce, String samDescription)
Call register in the contextInitialised method of your ServletContextListener
-
-
-
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
-
-
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 ServerAuthenitcationModulesce
- 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
-
-