Class CsrfTokenGeneratorMatcher

java.lang.Object
org.pac4j.core.matching.matcher.csrf.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 Details

    • CsrfTokenGeneratorMatcher

      public CsrfTokenGeneratorMatcher(CsrfTokenGenerator csrfTokenGenerator)

      Constructor for CsrfTokenGeneratorMatcher.

      Parameters:
      csrfTokenGenerator - a CsrfTokenGenerator object
  • Method Details

    • matches

      public boolean matches(CallContext ctx)
      Check if the context matches.
      Specified by:
      matches in interface Matcher
      Parameters:
      ctx - the context
      Returns:
      whether the context matches