Protect Custom API's using JWT Token

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
muttou
User
Posts: 135

Protect Custom API's using JWT Token

Post 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.


arbei
User
Posts: 9787

Post by arbei »

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


Post Reply