Skip to content

Conversation

@longsleep
Copy link
Collaborator

@longsleep longsleep commented Nov 4, 2024

When a identifier backend injects custom claims, those need to be carried over to access tokens and id tokens which are issued after a refresh token was exchanged via the token endpoint. This PR adds support for this by applying any extra claims recorded in the refresh token to the corresponding access and id tokens.

Certain clients do not implement the OIDC specification correctly and do
require the id token to be return even when using a refresh token. This
is possible but optional in the specs, so it is no problem to just do it
for compatibility reasons.
When using a refresh token, any potentially encoded extra claims for id
and access token must be retained. With this change, the claims embedded
into the refresh token are applied on top of any other access or id
token claims before creating the corresponding token. This avoids
loosing any of the backend provided claims when refresh tokens are used.
@longsleep longsleep force-pushed the longsleep-id-token-for-refresh-token branch from c4fae39 to 4aa7aba Compare November 11, 2024 10:59
@longsleep longsleep marked this pull request as ready for review November 11, 2024 11:09
@longsleep longsleep self-assigned this Nov 11, 2024
@longsleep longsleep merged commit cca3e4e into libregraph:master Nov 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant