0

I have my RBAC where, I have defined user v/s its roles/ scopes, now wanted to insert those to BeareToken scope field. What would be the approach?

Will it be possible through Keycloak SPI?

Jan Garaj
  • 25,598
  • 3
  • 38
  • 59
  • Yes, it is possible to do that through SPI. Have you implemented SPI? If yes, you must have extended `AbstractUserAdapterFederatedStorage` class. If you overwrite `getRoleMappings` method and return all the roles/authorities for that user, it will be set as roles in the token – Chetan Ahirrao Mar 17 '23 at 12:16

0 Answers0