Class CsrfTokenGeneratorMatcher

  • All Implemented Interfaces:
    Matcher

    public class CsrfTokenGeneratorMatcher
    extends java.lang.Object
    implements Matcher
    Matcher which creates a new CSRF token and adds it as a request attribute and as a cookie (AngularJS).
    Since:
    4.0.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • CsrfTokenGeneratorMatcher

        public CsrfTokenGeneratorMatcher​(CsrfTokenGenerator csrfTokenGenerator)
    • Method Detail

      • matches

        public boolean matches​(WebContext context,
                               SessionStore sessionStore)
        Description copied from interface: Matcher
        Check if the web context matches.
        Specified by:
        matches in interface Matcher
        Parameters:
        context - the web context
        sessionStore - the session store
        Returns:
        whether the web context matches
      • setCsrfTokenGenerator

        public void setCsrfTokenGenerator​(CsrfTokenGenerator csrfTokenGenerator)
      • getDomain

        public java.lang.String getDomain()
      • setDomain

        public void setDomain​(java.lang.String domain)
      • getPath

        public java.lang.String getPath()
      • setPath

        public void setPath​(java.lang.String path)
      • getHttpOnly

        public java.lang.Boolean getHttpOnly()
      • setHttpOnly

        public void setHttpOnly​(java.lang.Boolean httpOnly)
      • getSecure

        public java.lang.Boolean getSecure()
      • setSecure

        public void setSecure​(java.lang.Boolean secure)
      • getMaxAge

        public java.lang.Integer getMaxAge()
      • setMaxAge

        public void setMaxAge​(java.lang.Integer maxAge)
      • getSameSitePolicy

        public java.lang.String getSameSitePolicy()
      • setSameSitePolicy

        public void setSameSitePolicy​(java.lang.String sameSitePolicy)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object