public class AuthFilter extends AuthenticationFilter
AuthenticationFilter
that
obtains Hadoop-Auth configuration for webhdfs.AUTH_TOKEN_VALIDITY, AUTH_TYPE, CONFIG_PREFIX, COOKIE_DOMAIN, COOKIE_PATH, SIGNATURE_SECRET
Constructor and Description |
---|
AuthFilter() |
Modifier and Type | Method and Description |
---|---|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
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 . |
protected Properties |
getConfiguration(String prefix,
javax.servlet.FilterConfig config)
Returns the filter configuration properties,
including the ones prefixed with
CONF_PREFIX . |
createCookie, destroy, getAuthenticationHandler, getCookieDomain, getCookiePath, getRequestURL, getToken, getValidity, init, isRandomSecret
protected Properties getConfiguration(String prefix, javax.servlet.FilterConfig config) throws javax.servlet.ServletException
CONF_PREFIX
.
The prefix is removed from the returned property names.getConfiguration
in class AuthenticationFilter
prefix
- parameter not used.config
- parameter contains the initialization values.javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
AuthenticationFilter
AuthenticationHandler
.doFilter
in interface javax.servlet.Filter
doFilter
in class AuthenticationFilter
request
- the request object.response
- the response object.filterChain
- the filter chain object.IOException
- thrown if an IO error occurred.javax.servlet.ServletException
- thrown if a processing error occurred.Copyright © 2013 Apache Software Foundation. All rights reserved.