Repository navigation
Keycloak token generation based on custom attributes with Authentication SPI #16106
Unanswered
ShashiLakshan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have configured keycloak server as the authorization server in a product which is based on microservices architecture which includes api gateway and eureka registry. (All are spring projects.) This architecture is working fine.
But later the requirement was changed as below,
Use case:
User can register with providing his organization details.
User can login by providing his username and password.
User can create sub-level (child) organization with providing features and access rights.
These features are dynamic. i.e. not stored in the database. (But after creating features, those newly created features will be stored in database along with organization id)
User can switched to sub level of organization.
Then, new token will be generated based on sub level features and access rights.
After that user can only perform tasks based on new access token which has less privileges compared to initial token.
Is there way to generate a token, based on organization id. Then, access rights (claims) can be written into the token.
So token request will be like,
So, is it possible with custom authentication SPI?
Note : I have asked this question in stackoverflow as well.
All reactions