com.atlassian.jira.security.xsrf
Class XsrfTokenAdditionRequestFilter

java.lang.Object
  extended by com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter
All Implemented Interfaces:
javax.servlet.Filter

public class XsrfTokenAdditionRequestFilter
extends Object
implements javax.servlet.Filter

This request Filter will set a XSRF token into the session IF there is a user AND they dont already have a token.

Since:
v4.0

Constructor Summary
XsrfTokenAdditionRequestFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
          Adds the XSRF token to the session IF there is a user AND they dont already have a token
protected  ApplicationProperties getJiraApplicationProperties()
           
 void init(javax.servlet.FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsrfTokenAdditionRequestFilter

public XsrfTokenAdditionRequestFilter()
Method Detail

doFilter

public void doFilter(javax.servlet.ServletRequest servletRequest,
                     javax.servlet.ServletResponse servletResponse,
                     javax.servlet.FilterChain filterChain)
              throws IOException,
                     javax.servlet.ServletException
Adds the XSRF token to the session IF there is a user AND they dont already have a token

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
servletRequest - request
servletResponse - response
filterChain - filter chain
Throws:
IOException - if another filter in the filter chain throws it
javax.servlet.ServletException - if another filter in the filter chain throws it

getJiraApplicationProperties

protected ApplicationProperties getJiraApplicationProperties()

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter


Copyright © 2002-2012 Atlassian. All Rights Reserved.