Closed
Description
Is your feature request related to a problem? Please describe.
I can't pass any metadata along with the access token, i.e. to the token store. Also there's some fields missing that could be useful if one is using JWTs as ATs - such as the jti
(token id) and aud
(audience).
Describe the solution you'd like
A way to pass metadata, i.e. a String -> Any
map on the AT class. Also possibly add an optional id field to the AT, for the use case where your access token isn't an id itself.
Describe alternatives you've considered
- Make the Access Token class open so it can be extended
- Let the access token be an interface rather than a data class
Additional context
Maybe the same for refresh tokens. Possibly also for TokenInfo
so metadata can be shown in the token info endpoint? (unsure whether that's desired or not but it sure would be handy)