public class AuthTerminatorFilter extends AuthenticationFilter
ALLOWED_RESOURCES, AUTH_FAILED, AUTH_TOKEN_VALIDITY, AUTH_TYPE, CONFIG_PREFIX, COOKIE_DOMAIN, COOKIE_PATH, IS_COMPOSITE, SIGNATURE_SECRET, SIGNATURE_SECRET_FILE, SIGNER_SECRET_PROVIDER, SIGNER_SECRET_PROVIDER_ATTRIBUTE| Constructor and Description |
|---|
AuthTerminatorFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the filter.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
If the request has a valid authentication token it allows the request to continue to the target resource,
otherwise it triggers an authentication sequence using the configured
AuthenticationHandler. |
void |
init(javax.servlet.FilterConfig filterConfig)
Initializes the authentication filter and signer secret provider.
|
constructSecretProvider, createAuthCookie, getAuthenticationHandler, getConfiguration, getConfiguration, getCookieDomain, getCookiePath, getRequestURL, getToken, getValidity, initializeAuthHandler, initializeSecretProvider, isCustomSignerSecretProvider, isRandomSecret, proceedToNextFilter, respondWithUnauthorizedpublic void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
AuthenticationFilterInitializes the authentication filter and signer secret provider.
It instantiates and initializes the specifiedAuthenticationHandler.init in interface javax.servlet.Filterinit in class AuthenticationFilterfilterConfig - filter configuration.javax.servlet.ServletException - thrown if the filter or the authentication handler could not be initialized properly.public void destroy()
AuthenticationFilter
It invokes the AuthenticationHandler.destroy() method to release any resources it may hold.
destroy in interface javax.servlet.Filterdestroy in class AuthenticationFilterpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
AuthenticationFilterAuthenticationHandler.doFilter in interface javax.servlet.FilterdoFilter in class AuthenticationFilterrequest - the request object.response - the response object.chain - the filter chain object.java.io.IOException - thrown if an IO error occurred.javax.servlet.ServletException - thrown if a processing error occurred.