Skip to content

Commit

Permalink
Fix the client assertion validation logic to avoid rejecting assertio…
Browse files Browse the repository at this point in the history
…ns that don't specify an "iat" claim
  • Loading branch information
kevinchalet committed Jan 17, 2024
1 parent cf3e960 commit 24e242e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/OpenIddict.Server/OpenIddictServerHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,19 +687,6 @@ public ValueTask HandleAsync(ProcessAuthenticationContext context)
return default;
}

// Client assertions MUST contain contain an "iat" claim. For more information,
// see https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication
// and https://datatracker.ietf.org/doc/html/rfc7523#section-3.
if (!context.ClientAssertionPrincipal.HasClaim(Claims.IssuedAt))
{
context.Reject(
error: Errors.InvalidRequest,
description: SR.FormatID2172(Claims.IssuedAt),
uri: SR.FormatID8000(SR.ID2172));

return default;
}

return default;

static bool ValidateClaimGroup(string name, List<Claim> values) => name switch
Expand Down

0 comments on commit 24e242e

Please sign in to comment.