com.gwtplatform.dispatch.server
Class AbstractRandomSecurityCookieFilter
java.lang.Object
com.gwtplatform.dispatch.server.AbstractRandomSecurityCookieFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public abstract class AbstractRandomSecurityCookieFilter
- extends Object
- implements javax.servlet.Filter
This filter will automatically inject a security cookie inside the request the first time the page is loaded. This
security cookie is a simple randomly generated number, and might be slightly less secure than
HttpSessionSecurityCookieFilter
, although it will work even if you don't have access to an
HttpSession
. To setup this filter, add the following line at before any other
serve
call in your own com.google.inject.servlet.ServletModule#configureServlets
:
filter("*.jsp").through(HttpSessionSecurityCookieFilter.class);
You also have to use a .jsp
file instead of a .html
as your main GWT file.
- Author:
- Philippe Beaudoin
Method Summary |
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
|
void |
init(javax.servlet.FilterConfig filterConfig)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
random
protected final SecureRandom random
securityCookieName
protected final String securityCookieName
AbstractRandomSecurityCookieFilter
protected AbstractRandomSecurityCookieFilter(String securityCookieName,
SecureRandom random)
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 chain)
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
Copyright © 2010-2013 JBoss by Red Hat. All Rights Reserved.