Class AxelorCsrfGenerator

  • All Implemented Interfaces:
    org.pac4j.core.matching.matcher.csrf.CsrfTokenGenerator

    @Singleton
    public class AxelorCsrfGenerator
    extends org.pac4j.core.matching.matcher.csrf.DefaultCsrfTokenGenerator
    Default CSRF token generator since pac4j 5 generates tokens per HTTP request.

    This reverts to pac4j 4 CSRF token generator behavior, because of asynchronous request issues with current web client.

    Code taken from: https://github.com/pac4j/pac4j/blob/4.5.x/pac4j-core/src/main/java/org/pac4j/core/matching/matcher/csrf/DefaultCsrfTokenGenerator.java

    • Constructor Detail

      • AxelorCsrfGenerator

        public AxelorCsrfGenerator()
    • Method Detail

      • get

        public String get​(org.pac4j.core.context.WebContext context,
                          org.pac4j.core.context.session.SessionStore sessionStore)
        Specified by:
        get in interface org.pac4j.core.matching.matcher.csrf.CsrfTokenGenerator
        Overrides:
        get in class org.pac4j.core.matching.matcher.csrf.DefaultCsrfTokenGenerator
      • getTokenFromSession

        protected Optional<String> getTokenFromSession​(org.pac4j.core.context.WebContext context,
                                                       org.pac4j.core.context.session.SessionStore sessionStore)