|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.internet2.middleware.shibboleth.idp.session.IdPSessionFilter
public class IdPSessionFilter
A filter that adds the current users Session the request, if the user has a session.
| Field Summary | |
|---|---|
private boolean |
consistentAddress
Whether the client must always come back from the same address. |
private String |
cookieDomain
Non-default cookie domain, if set. |
private org.slf4j.Logger |
log
Class Logger. |
private SessionManager<Session> |
sessionManager
IdP session manager. |
| 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. |
protected Session |
getUserSession(javax.servlet.http.Cookie sessionCookie,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Gets the user session associated with a session cookie. |
void |
init(javax.servlet.FilterConfig filterConfig)
|
protected boolean |
isCookieValid(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
byte[] v4AddressBytes,
byte[] v6AddressBytes,
byte[] sessionIdBytes,
byte[] signatureBytes,
byte[] sessionSecret)
Validates the session cookie. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final org.slf4j.Logger log
private String cookieDomain
private boolean consistentAddress
private SessionManager<Session> sessionManager
| Constructor Detail |
|---|
public IdPSessionFilter()
| Method Detail |
|---|
public void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOException
javax.servlet.ServletException
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionprotected javax.servlet.http.Cookie getIdPSessionCookie(javax.servlet.http.HttpServletRequest httpRequest)
httpRequest - current HTTP request
protected Session getUserSession(javax.servlet.http.Cookie sessionCookie,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
sessionCookie - the session cookiehttpRequest - the current HTTP requesthttpResponse - the current HTTP response
protected boolean isCookieValid(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
byte[] v4AddressBytes,
byte[] v6AddressBytes,
byte[] sessionIdBytes,
byte[] signatureBytes,
byte[] sessionSecret)
httpRequest - incoming HTTP requesthttpResponse - outgoing HTTP responsev4AddressBytes - IPv4 remote address from the cookie valuev6AddressBytes - IPv6 remote address from the cookie valuesessionIdBytes - session ID from the cookie valuesignatureBytes - signature from the cookie valuesessionSecret - secrete associated with the user's session
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||