Page 1 of 1

Protect Custom API's using JWT Token

Posted: Sat Sep 07, 2024 1:40 pm
by muttou

Hi,
I want to protect my own API action similar to the built-in API action, How can i check the JWT token under Api_Action method. Refer to the source code of ApiPermissionMiddleware on how to check the JWT token.

Any sample & help will highly be appreciated. Thank you for your positive response.


Re: Protect Custom API's using JWT Token

Posted: Sun Sep 08, 2024 10:07 am
by arbei

You may add JwtMiddleware to your action, see Route Middleware.