public class Pac4jDispatcherFilter extends Object implements javax.servlet.Filter
This is the main filter for the pac4j provider. The pac4j provider module heavily relies on the j2e-pac4j library (https://github.com/pac4j/j2e-pac4j).
This filter dispatches the HTTP calls between the j2e-pac4j filters:
CallbackFilter if the client_name parameter exists: it finishes the authentication processSecurityFilter otherwise: it starts the authentication process (redirection to the identity provider) if the user is not authenticatedIt uses the KnoxSessionStore to manage session data. The generated cookies are defined on a domain name
which can be configured via the domain suffix parameter: pac4j.cookie.domain.suffix.
The callback url must be defined to the current protected url (KnoxSSO service for example) via the parameter: pac4j.callbackUrl.
| Modifier and Type | Field and Description |
|---|---|
static String |
PAC4J_CALLBACK_PARAMETER |
static String |
PAC4J_CALLBACK_URL |
static String |
PAC4J_OICD_TYPE_AZURE |
static String |
PAC4J_SESSION_STORE_EXCLUDE_CUSTOM_ATTRIBUTES |
static String |
PAC4J_SESSION_STORE_EXCLUDE_CUSTOM_ATTRIBUTES_DEFAULT |
static String |
PAC4J_SESSION_STORE_EXCLUDE_GROUPS |
static String |
PAC4J_SESSION_STORE_EXCLUDE_GROUPS_DEFAULT |
static String |
PAC4J_SESSION_STORE_EXCLUDE_PERMISSIONS |
static String |
PAC4J_SESSION_STORE_EXCLUDE_PERMISSIONS_DEFAULT |
static String |
PAC4J_SESSION_STORE_EXCLUDE_ROLES |
static String |
PAC4J_SESSION_STORE_EXCLUDE_ROLES_DEFAULT |
static String |
TEST_BASIC_AUTH |
static String |
URL_PATH_SEPARATOR |
| Constructor and Description |
|---|
Pac4jDispatcherFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain) |
void |
init(javax.servlet.FilterConfig filterConfig) |
public static final String TEST_BASIC_AUTH
public static final String PAC4J_CALLBACK_URL
public static final String PAC4J_CALLBACK_PARAMETER
public static final String PAC4J_OICD_TYPE_AZURE
public static final String URL_PATH_SEPARATOR
public static final String PAC4J_SESSION_STORE_EXCLUDE_GROUPS
public static final String PAC4J_SESSION_STORE_EXCLUDE_ROLES
public static final String PAC4J_SESSION_STORE_EXCLUDE_PERMISSIONS
public static final String PAC4J_SESSION_STORE_EXCLUDE_CUSTOM_ATTRIBUTES
public static final String PAC4J_SESSION_STORE_EXCLUDE_CUSTOM_ATTRIBUTES_DEFAULT
public static final String PAC4J_SESSION_STORE_EXCLUDE_GROUPS_DEFAULT
public static final String PAC4J_SESSION_STORE_EXCLUDE_ROLES_DEFAULT
public static final String PAC4J_SESSION_STORE_EXCLUDE_PERMISSIONS_DEFAULT
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.FilterCopyright © 2023 The Apache Software Foundation. All rights reserved.