Class AuthenticationFilter
java.lang.Object
com.mapr.web.security.hadoop.jakartaauth.AuthenticationFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SignerSecretProviderconstructSecretProvider(jakarta.servlet.ServletContext ctx, Properties config, boolean disallowFallbackToRandomSecretProvider) static voidcreateAuthCookie(String name, jakarta.servlet.http.HttpServletResponse resp, jakarta.servlet.http.HttpServletRequest req, String token, String domain, String path, long expires, boolean isCookiePersistent, boolean isSecure, long jwtExp) voiddestroy()protected voiddoFilter(jakarta.servlet.FilterChain filterChain, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) voiddoFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain) protected AuthenticationHandlerprotected Propertiesprotected PropertiesgetConfiguration(String configPrefix, jakarta.servlet.FilterConfig filterConfig) protected Stringprotected Stringprotected longprotected StringgetRequestURL(jakarta.servlet.http.HttpServletRequest request) protected AuthenticationTokengetToken(jakarta.servlet.http.HttpServletRequest request) protected longvoidinit(jakarta.servlet.FilterConfig filterConfig) protected voidinitializeAuthHandler(String authHandlerClassName, jakarta.servlet.FilterConfig filterConfig) protected voidinitializeSecretProvider(jakarta.servlet.FilterConfig filterConfig) protected booleanprotected booleanprotected booleanprotected booleanverifyTokenType(AuthenticationHandler handler, AuthenticationToken token)
-
Field Details
-
CONFIG_PREFIX
- See Also:
-
AUTH_TYPE
- See Also:
-
SIGNATURE_SECRET
- See Also:
-
SIGNATURE_SECRET_FILE
- See Also:
-
AUTH_TOKEN_MAX_INACTIVE_INTERVAL
- See Also:
-
AUTH_TOKEN_VALIDITY
- See Also:
-
COOKIE_DOMAIN
- See Also:
-
COOKIE_PATH
- See Also:
-
COOKIE_PERSISTENT
- See Also:
-
SIGNER_SECRET_PROVIDER
- See Also:
-
SIGNER_SECRET_PROVIDER_ATTRIBUTE
- See Also:
-
SSO_LOGIN_COOKIE
- See Also:
-
ACTION_PARAM
- See Also:
-
configPrefix
-
-
Constructor Details
-
AuthenticationFilter
public AuthenticationFilter()
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Filter- Throws:
jakarta.servlet.ServletException
-
initializeAuthHandler
protected void initializeAuthHandler(String authHandlerClassName, jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Throws:
jakarta.servlet.ServletException
-
initializeSecretProvider
protected void initializeSecretProvider(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Throws:
jakarta.servlet.ServletException
-
constructSecretProvider
public static SignerSecretProvider constructSecretProvider(jakarta.servlet.ServletContext ctx, Properties config, boolean disallowFallbackToRandomSecretProvider) throws Exception - Throws:
Exception
-
getConfiguration
-
getAuthenticationHandler
-
isRandomSecret
protected boolean isRandomSecret() -
isCustomSignerSecretProvider
protected boolean isCustomSignerSecretProvider() -
getMaxInactiveInterval
protected long getMaxInactiveInterval() -
getValidity
protected long getValidity() -
getCookieDomain
-
getCookiePath
-
isCookiePersistent
protected boolean isCookiePersistent() -
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-
getConfiguration
protected Properties getConfiguration(String configPrefix, jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Throws:
jakarta.servlet.ServletException
-
getRequestURL
-
getToken
protected AuthenticationToken getToken(jakarta.servlet.http.HttpServletRequest request) throws IOException, AuthenticationException - Throws:
IOExceptionAuthenticationException
-
verifyTokenType
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
doFilter
protected void doFilter(jakarta.servlet.FilterChain filterChain, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException - Throws:
IOExceptionjakarta.servlet.ServletException
-
createAuthCookie
-
getAuthUrl
-
getLogoutUrl
-
getCookieTokenName
-