--
You received this message because you are subscribed to the Google Groups "Pac4j users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/dc5a10fd-0742-4eaa-8334-42a0cd5de3d6%40googlegroups.com.
Hi,Which version of pac4j do you use? I guess v4.By default, a CSRF token is generated which should be sent for a POST request.Either you disable the csrfCheck by setting the authorizers property to blankoryou get the CSRF token from the request or cookie (pac4jCsrfToken) and send it along your POST request.Thanks.Best regards,Jérôme
Le mar. 31 mars 2020 à 21:45, Swetha <sswe...@gmail.com> a écrit :
Hi,--In our application, we are using pac4j saml security, I'm getting the following exception when I'm trying to hit the POST API.o.p.c.a.c.DefaultAuthorizationChecker: Checking authorizer: org.pac4j.core.authorization.authorizer.csrf.CsrfAuthorizer@3f9e0794 -> false2020-03-28 00:19:58.566 DEBUG 16708 --- [ XNIO-1 task-35] o.p.core.engine.DefaultSecurityLogic : forbiddenI have gone through the csrfAuthorizer class, I found the following code in isAuthorized method, it is blocking us.final boolean checkRequest = checkAllRequests || isPost(context) || isPut(context) || isPatch(context) || isDelete(context);Could anyone please help me in fixing this issue ?And we are generating JWT Tokens, and passing them in header for every API call.Thanks in AdvanceRegards,Swetha
You received this message because you are subscribed to the Google Groups "Pac4j users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/7436084f-0e92-42b6-9641-695bee9c8f50%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/7436084f-0e92-42b6-9641-695bee9c8f50%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/b5694d72-ab9c-4dd9-94c6-318d8b4af974%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/b5694d72-ab9c-4dd9-94c6-318d8b4af974%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/2b55a265-3736-4978-80cc-a3b780601e11%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/2b55a265-3736-4978-80cc-a3b780601e11%40googlegroups.com.
You can check if any of the out-of-the box authorizers suits your needs, or, as you suggested, write your own.
Alternatively, If you want to use csrf, do as Jérôme says:
>you get the CSRF token from the request or cookie (pac4jCsrfToken)
and send it along your POST request.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/edeae359-21b7-43ae-8305-7dea5fe10d17o%40googlegroups.com.