Closed aDogCalledSpot closed 6 months ago
Thanks for the addition! :-)
One question though: why do you think the key of the roles map are something else than strings? This adds a lot of complexity with traits to the code.
Wouldn't it be simpler if you just used "String"?
Roles are perfect for being displayed as enums and how I would assume that most people are going to implement the roles in their backends. Adding a few trait bounds here leads to a lot of boilerplate being removed where the strings are constantly converted from and to an enum instance on which all the logic is based.
I added String
as the default type, so if no handling in particular is specified then you can always fall back to using String
. This also means that this change is backwards compatible.
:tada: This PR is included in version 4.3.0 :tada:
The release is available on:
v4.3.0
Your semantic-release bot :package::rocket:
Allows fetching the project roles from the returned JWT token when using the introspection endpoint.
Is generic over a type for the roles so that users can do something like: