From 91ea2d727622a1b409c88dfa4e59b5eed4648799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Thu, 24 Oct 2019 04:32:03 +0200 Subject: [PATCH] Update the OpenIddict server Data Protection handlers to use the appropriate principal properties --- .../OpenIddictServerDataProtectionHandlers.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs index e9fe275b..c6e303fa 100644 --- a/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs +++ b/src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionHandlers.cs @@ -853,7 +853,7 @@ namespace OpenIddict.Server.DataProtection context.Logger.LogTrace("The authorization code '{Identifier}' was successfully created and the " + "following JWT payload was attached to the OpenID Connect response: {Payload}. " + "The principal used to create the token contained the following claims: {Claims}.", - context.AccessTokenPrincipal.GetClaim(Claims.JwtId), + context.AuthorizationCodePrincipal.GetClaim(Claims.JwtId), context.Response.Code, context.AuthorizationCodePrincipal.Claims); return default; @@ -919,7 +919,7 @@ namespace OpenIddict.Server.DataProtection context.Logger.LogTrace("The refresh token '{Identifier}' was successfully created and the " + "following JWT payload was attached to the OpenID Connect response: {Payload}. " + "The principal used to create the token contained the following claims: {Claims}.", - context.AccessTokenPrincipal.GetClaim(Claims.JwtId), + context.RefreshTokenPrincipal.GetClaim(Claims.JwtId), context.Response.RefreshToken, context.RefreshTokenPrincipal.Claims); return default;