Skip to content

Commit

Permalink
Add user id to TOKEN_EXCHANGE events
Browse files Browse the repository at this point in the history
Co-authored-by: thaDude <ogdude@googlemail.com>
  • Loading branch information
2 people authored and pedroigor committed Feb 22, 2023
1 parent 2b98fcd commit 82423f3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ protected Response exchangeClientToOIDCClient(UserModel targetUser, UserSessionM
}

AccessTokenResponse res = responseBuilder.build();
event.detail(Details.AUDIENCE, targetClient.getClientId());
event.detail(Details.AUDIENCE, targetClient.getClientId())
.user(targetUser);

event.success();

Expand Down Expand Up @@ -460,7 +461,9 @@ protected Response exchangeClientToSAML2Client(UserModel targetUser, UserSession
res.setExpiresIn(assertionLifespan <= 0 ? realm.getAccessCodeLifespan() : assertionLifespan);
res.setOtherClaims(OAuth2Constants.ISSUED_TOKEN_TYPE, requestedTokenType);

event.detail(Details.AUDIENCE, targetClient.getClientId());
event.detail(Details.AUDIENCE, targetClient.getClientId())
.user(targetUser);

event.success();

return cors.builder(Response.ok(res, MediaType.APPLICATION_JSON_TYPE)).build();
Expand Down

0 comments on commit 82423f3

Please sign in to comment.