edu.internet2.middleware.shibboleth.idp.session
Class IdPSessionFilter

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.idp.session.IdPSessionFilter
All Implemented Interfaces:
javax.servlet.Filter

public class IdPSessionFilter
extends Object
implements javax.servlet.Filter

A filter that adds the current users Session the request, if the user has a session.


Constructor Summary
IdPSessionFilter()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)
          
protected  javax.servlet.http.Cookie getIdPSessionCookie(javax.servlet.http.HttpServletRequest httpRequest)
          Gets the IdP session cookie from the current request, if the user currently has a session.
 void init(javax.servlet.FilterConfig filterConfig)
          
protected  Session validateCookie(javax.servlet.http.Cookie sessionCookie, javax.servlet.http.HttpServletRequest httpRequest)
          Validates the given session cookie against the associated session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdPSessionFilter

public IdPSessionFilter()
Method Detail

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain filterChain)
              throws IOException,
                     javax.servlet.ServletException

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

getIdPSessionCookie

protected javax.servlet.http.Cookie getIdPSessionCookie(javax.servlet.http.HttpServletRequest httpRequest)
Gets the IdP session cookie from the current request, if the user currently has a session.

Parameters:
httpRequest - current HTTP request
Returns:
the user's current IdP session cookie, if they have a current session, otherwise null

validateCookie

protected Session validateCookie(javax.servlet.http.Cookie sessionCookie,
                                 javax.servlet.http.HttpServletRequest httpRequest)
Validates the given session cookie against the associated session.

Parameters:
sessionCookie - the session cookie
httpRequest - the current HTTP request
Returns:
the session against which the cookie was validated


Copyright © 2006-2008 Internet2. All Rights Reserved.