3.2.8.2. User info
If the ID token does not provide enough information about the currently authenticated user, you can get more information from the UserInfo endpoint. Set the quarkus.oidc.authentication.user-info-required=true property to request a UserInfo JSON object from the OIDC UserInfo endpoint.
A request is sent to the OIDC provider UserInfo endpoint by using the access token returned with the authorization code grant response, and an io.quarkus.oidc.UserInfo (a simple jakarta.json.JsonObject wrapper) object is created. io.quarkus.oidc.UserInfo can be injected or accessed as a SecurityIdentity userinfo attribute.
quarkus.oidc.authentication.user-info-required is automatically enabled if one of these conditions is met:
-
if
quarkus.oidc.roles.sourceis set touserinfoorquarkus.oidc.token.verify-access-token-with-user-infois set totrueorquarkus.oidc.authentication.id-token-requiredis set tofalse, the current OIDC tenant must support a UserInfo endpoint in these cases. -
if
io.quarkus.oidc.UserInfoinjection point is detected but only if the current OIDC tenant supports a UserInfo endpoint.