bottle-jwt
bottle-jwt copied to clipboard
How to add custom claims in JWT payload?
bottle-jwt is really great :)
I would really like if I could add some custom payload to JWT. So that the client can have some extra information.
What about if the whole dict representing a user returned by authenticate_user
of the AuthProvider
would be used as JWT payload? Currently, only the field id
of this dict is used. Or do I miss something?
In your use case you need to have more user data encrypted within your token, so that a Javascript client that decrypts the token will have more information about request user. Am i getting it right?
Yes, that is exactly what I meant.
I 'm about to add your functionality within the week.
Perfect. I can offer you some help, if you want
is this function already on the library?
I will merge your feature on Saturday , thanks for your patience.
hey! im not sure if you had already merge that feature on the library. But if you still haven't i would not mind just asking, i'm lazy and i don't want to code something if the feature is already there. Thank you in advice.