-
Notifications
You must be signed in to change notification settings - Fork 1
PIN-6662 Auth Server M2M token generation #1824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Co-authored-by: Alessio Gallitano <[email protected]>
…opa/interop-be-monorepo into PIN-6663_update-client-model
575aac1
to
299c3cc
Compare
299c3cc
to
8b43f20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just a few points
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job 🚀
I just suggest adminId as field name inside the token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! You discussed about reusing the token models defined in AuthData, that now seem to be duplicated in the interop-token/models - is it tracked as a further task?
========================================== */ | ||
export type InteropJwtInternalPayload = InteropJwtCommonPayload & { | ||
sub: string; | ||
role: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role: string; | |
role: Extract<SystemRole, "internal"> |
Closes PIN-6662
Description
This PR enable Authorization server to provide a API Token with role
M2M_ADMIN
, this role allows users to API v2 usages.The JWT Token with this role has claim "userId" with Client's AdminId.
Test
✅ Improve integration and unit tests with Token M2M_ADMIN role case