Skip to content

IdTokenHintParser Class

Decides whether an id_token_hint is an ID token this server issued.

C#
public class IdTokenHintParser : Abblix.Oidc.Server.Features.Tokens.Validation.IIdTokenHintParser

Inheritance System.Object → IdTokenHintParser

Implements IIdTokenHintParser

Remarks

Three questions, in the order that makes each one cheap. Is it ours - signature and issuer. Is it an ID token rather than another kind of JWT we sign with the same key. And does it carry the claim an ID token is required to carry, which is what parts it from the one other kind that has no type either.

Who the audience must name is left to the caller, because the two callers disagree. The authorization endpoint requires the requesting client; the end-session endpoint reads the client out of the audience when the request omitted it. What both agree on is that this server need not be in it - OpenID Connect Core 1.0 Section 3.1.2.1: "The Authorization Server need not be listed as an audience of the ID Token when it is used as an id_token_hint value."

Constructors

IdTokenHintParser(IAuthServiceJwtValidator) Constructor

Decides whether an id_token_hint is an ID token this server issued.

C#
public IdTokenHintParser(Abblix.Oidc.Server.Features.Tokens.Validation.IAuthServiceJwtValidator jwtValidator);

Parameters

jwtValidator IAuthServiceJwtValidator

Validates the hint's signature and issuer.

Remarks

Three questions, in the order that makes each one cheap. Is it ours - signature and issuer. Is it an ID token rather than another kind of JWT we sign with the same key. And does it carry the claim an ID token is required to carry, which is what parts it from the one other kind that has no type either.

Who the audience must name is left to the caller, because the two callers disagree. The authorization endpoint requires the requesting client; the end-session endpoint reads the client out of the audience when the request omitted it. What both agree on is that this server need not be in it - OpenID Connect Core 1.0 Section 3.1.2.1: "The Authorization Server need not be listed as an audience of the ID Token when it is used as an id_token_hint value."

Methods

IdTokenHintParser.ParseAsync(string) Method

Validates a hint and returns the ID token, or a description of why it is not acceptable.

C#
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Jwt.JsonWebToken,string>> ParseAsync(string idTokenHint);

Parameters

idTokenHint System.String

The raw parameter value.

Implements ParseAsync(string)

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<JsonWebToken,System.String>>
The validated ID token, or a human-readable reason the caller wraps in its own error shape - the two endpoints report failures as different types.