Package com.axelor.auth.pac4j
Class AxelorCsrfGenerator
- java.lang.Object
-
- org.pac4j.core.matching.matcher.csrf.DefaultCsrfTokenGenerator
-
- com.axelor.auth.pac4j.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 Summary
Constructors Constructor Description AxelorCsrfGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
get(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
protected Optional<String>
getTokenFromSession(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
-
-
-
Method Detail
-
get
public String get(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
- Specified by:
get
in interfaceorg.pac4j.core.matching.matcher.csrf.CsrfTokenGenerator
- Overrides:
get
in classorg.pac4j.core.matching.matcher.csrf.DefaultCsrfTokenGenerator
-
-