Middleware for validate token #197
Unanswered
josejachuf
asked this question in
Q&A
Replies: 2 comments
-
Hi @chrislearn, this seems to works as I need, only that I must change the answers when the Token is not valid.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
In this way it allows me to return in JSON with something more personalized
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to create a middleware to validate a token. The Token gives me an authentication center (another app) and it comes in the Header
Authorization "Bearer my-token"
I'm not using features = ["jwt-auth"], I directly use jsonwebtoken crate
Taking the example (from jsonwebtoken [https://github.com/Keats/jsonwebtoken/blob/master/examples/validation.rs]) to validate the token I have the following:
But it's not really what I want and I need. I want something similar to:
Beta Was this translation helpful? Give feedback.
All reactions