Skip to content

id_token signature validation in OpenIdConnectHandler in case of authorization code flow #37549

@Riff451

Description

@Riff451

Hello,
I've noticed that the OpenIdConnectHandler is setting TokenValidationParameters.RequireSignedTokens to false in case of authorization code flow as per OIDC spec:

// no need to validate signature when token is received using "code flow" as per spec
// [http://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation].
validationParameters.RequireSignedTokens = false;

However the JwtSecurityTokenHandler.ValidateSignature() method that, if I'm not wrong, eventually gets called, validates the signature when the token is signed even if TokenValidationParameters.RequireSignedTokens is false.

Am I missing something?
Is this something expected in the OpenIdConnectHandler?

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-authIncludes: Authn, Authz, OAuth, OIDC, Bearerinvestigate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions