com.atlassian.crowd.integration.http
Class VerifyTokenFilter

java.lang.Object
  extended by com.atlassian.crowd.integration.service.soap.client.GenericClient
      extended by com.atlassian.crowd.integration.http.VerifyTokenFilter

public class VerifyTokenFilter
extends GenericClient

This filter manages protecting a web.xml url-pattern. If the requesting principal does not have a valid token, they will be redirected to the authentication path specified in the crowd.properties configuration file. Additional values are stored to the principal's session such as their originally requested URL should their authentication be found invalid.


Field Summary
static String LAST_VALIDATED
          The session key stored as a Date, is the last time the principal had a successful token validation.
static String ORIGINAL_URL
          The session key stored as a String, is the requested secure url before redirect to the authentication page.
 
Fields inherited from class com.atlassian.crowd.integration.service.soap.client.GenericClient
applciationAuthenticationContext, applicationAuthenticationURL, applicationName, applicationPassword, applicationToken, securityServerURL, sessionIsAuthenticated, sessionLastValidation, sessionTokenKey, sessionValidationInterval, UNABLE_TO_CONNECT
 
Constructor Summary
VerifyTokenFilter()
           
 
Method Summary
 void destroy()
          Shuts down the filter.
 void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
          Executes the filter.
 void init(FilterConfig filterConfig)
          Configures the filter.
 
Methods inherited from class com.atlassian.crowd.integration.service.soap.client.GenericClient
authenticate, getApplciationAuthenticationContext, getApplicationAuthenticationURL, getApplicationName, getApplicationPassword, getApplicationToken, getProperties, getSecurityServer, getSecurityServerURL, getSessionIsAuthenticated, getSessionLastValidation, getSessionTokenKey, getSessionValidationInterval, setApplciationAuthenticationContext, setApplicationAuthenticationURL, setApplicationName, setApplicationPassword, setSecurityServerURL, setSessionIsAuthenticated, setSessionLastValidation, setSessionTokenKey, setSessionValidationInterval, updateProperties, updateProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORIGINAL_URL

public static final String ORIGINAL_URL
The session key stored as a String, is the requested secure url before redirect to the authentication page.


LAST_VALIDATED

public static final String LAST_VALIDATED
The session key stored as a Date, is the last time the principal had a successful token validation.

Constructor Detail

VerifyTokenFilter

public VerifyTokenFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Configures the filter.

Parameters:
filterConfig - the FilterConfig to use.
Throws:
javax.servlet.ServletException - Filter related problems.
ServletException

destroy

public void destroy()
Shuts down the filter.


doFilter

public void doFilter(ServletRequest servletRequest,
                     ServletResponse servletResponse,
                     FilterChain filterChain)
              throws IOException,
                     ServletException
Executes the filter.

Parameters:
servletRequest - the ServletRequest to use.
servletResponse - the ServletResponse to use.
filterChain - the FilterChain to use.
Throws:
IOException - I/O related problems.
ServletException - Servlet related problems.


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.