Class CsrfTokenGeneratorMatcher

  • All Implemented Interfaces:
    Matcher

    public class CsrfTokenGeneratorMatcher
    extends 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)
        Description copied from interface: Matcher
        Check if the web context matches.
        Specified by:
        matches in interface Matcher
        Parameters:
        context - the web context
        Returns:
        whether the web context matches
      • setCsrfTokenGenerator

        public void setCsrfTokenGenerator​(CsrfTokenGenerator csrfTokenGenerator)
      • getDomain

        public String getDomain()
      • setDomain

        public void setDomain​(String domain)
      • getPath

        public String getPath()
      • setPath

        public void setPath​(String path)
      • getHttpOnly

        public Boolean getHttpOnly()
      • setHttpOnly

        public void setHttpOnly​(Boolean httpOnly)
      • getSecure

        public Boolean getSecure()
      • setSecure

        public void setSecure​(Boolean secure)
      • getMaxAge

        public Integer getMaxAge()
      • setMaxAge

        public void setMaxAge​(Integer maxAge)