I'd like to use this extension but I want to redefine it's core function. Can I do this?
What I actually want to do
I want not to terminate request if JWT is wrong or empty like here:
But instead let each endpoint to decide what is allowed and what is not based on context["id"] which was set by middleware either to nil or User model.
So I want this middleware only to do all JWT stuff and c.Set(mw.IdentityKey, identity) but not to make any 401 respond.
If I can do it now - can you show how?
I'd like to use this extension but I want to redefine it's core function. Can I do this?
What I actually want to do
I want not to terminate request if JWT is wrong or empty like here:
gin-jwt/auth_jwt.go
Line 350 in 633d983
But instead let each endpoint to decide what is allowed and what is not based on context["id"] which was set by middleware either to nil or User model.
So I want this middleware only to do all JWT stuff and
c.Set(mw.IdentityKey, identity)but not to make any 401 respond.If I can do it now - can you show how?