From 32ac00640d8aac8185eba187877a836725e1a126 Mon Sep 17 00:00:00 2001 From: jpda Date: Tue, 10 Dec 2024 18:15:41 -0500 Subject: [PATCH] #13, use validated principal claims --- .../DPoP/DPoPJwtBearerEvents.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPJwtBearerEvents.cs b/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPJwtBearerEvents.cs index 0f1f7b8..52d2572 100644 --- a/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPJwtBearerEvents.cs +++ b/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPJwtBearerEvents.cs @@ -82,7 +82,7 @@ public override async Task TokenValidated(TokenValidatedContext context) Scheme = context.Scheme.Name, ProofToken = proofToken, AccessToken = at, - AccessTokenClaims = parsedToken?.Claims ?? [], + AccessTokenClaims = context.Principal?.Claims ?? parsedToken?.Claims ?? [], Method = context.HttpContext.Request.Method, Url = context.HttpContext.Request.Scheme + "://" + context.HttpContext.Request.Host + context.HttpContext.Request.PathBase + context.HttpContext.Request.Path });