I noticed that there is a differentiation between custom post auth middlewares and custom post middlewares.
Whereas I can not find this differentiation in Middleware Scripting Guide section where we talk about only “pre” and “post” middlewares.
Can anybody explain how can I create a custom post auth middleware ?
Hi, the post-auth middleware gets executed immediately after the authentication, the post middleware is executed after additional middleware like key expiry check, access rights, check, etc. Both get executed before sending the request to upstream.
To create a post-auth middleware use post_key_auth (instead of pre or post) when creating your plugin bundle or defining your custom middleware block, see this plugin bundle manifest contents:
Hello @matiasb and thanks for your reply.
I understand better how to add a custom post auth middleware.
My last question is: is it possible to implement this kind of middleware with JS like the pre and post middlewares?