Answer the question
In order to leave comments, you need to log in
How to make a Middleware for JWT Authentication?
The problem is that in all the guides, they simply decode the token and check for validity. But the problem remains that one token has access to everything. For example, DELETE:username. I, using one token, can delete any user, because there is no :username parameter check and no username stigma.
I don’t know how to implement middleware, because I use different parameters in different endpoints and groups (not only :username), and in some I also need to check the glue username with json. field
Maybe I'm tricky and you need to remove the parameters, and send the data from the stigma with the username further along the equations.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question