Closed FrTerstappen closed 2 months ago
Hey @FrTerstappen,
That sounds pretty good!
However, I think that if the only major difference is the field, it would be better to create one global IntrospectedUser
to avoid code duplication, in my opinion.
Hello,
currently the struct
IntrospectedUser
is defined three times. Once for each of the frameworks actix, axum and rocket. Only the version used by axum has a field for the project_roles.I am currently using a locally patched version of this library with rocket where I added the field (and its assignment) to the struct. This is working without problem.
I propose adding this directly to the library for rocket and actix so that the features for the three frameworks are the same. I see two possibilities to achieve this. One is to add the fields to the two other definitions of
IntrospectedUser
and the other is moving theIntrospectedUser
struct to a central place and only having one. They currently seem to only differ by this filed and their description comment.I am happy to provide a pull request for either of those to options if this is a change you are interested in.