| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
IdPSessionFilter() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
private final org.slf4j.Logger log
private String cookieDomain
private boolean consistentAddress
private SessionManager<Session> sessionManager
public void destroy()
destroy in interface javax.servlet.Filterpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic 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 requestprotected 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 responseprotected 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 sessionCopyright © 1999-2014. All Rights Reserved.