Quarkus oidc: extract roles from userInfo instead of idToken

139 Views Asked by At

I am trying to extract the roles that I'm getting from my identity provider so that I can use @RolesAllowed.

The issue is that io.quarkus.oidc.runtime.OidcUtils.findClaimWithRoles() will only receive the idToken to find the claim, but my roles claim "groups" is in the userInfo instead.

Is there any way to accomplish this? One possible solution seemed to be a augmentor, but it's not possible to inject the userInfo within that augmentor

1

There are 1 best solutions below

0
On

By chance, I found the following configuration to accomplish my goal:

quarkus.oidc.roles.source=userinfo