Table of Contents

Interface ITokenRequestValidator

Namespace
Fdyay.IdentityServer.Validation
Assembly
Fdyay.IdentityServer.Core.dll

Validates token endpoint requests for an authenticated client.

public interface ITokenRequestValidator

Methods

ValidateAsync(Client, ParsedSecret?, IReadOnlyDictionary<string, string>, CancellationToken)

Validates a request from a client that authenticated with secret.

Task<TokenRequestValidationResult> ValidateAsync(Client client, ParsedSecret? secret, IReadOnlyDictionary<string, string> parameters, CancellationToken cancellationToken = default)

Parameters

client Client
secret ParsedSecret
parameters IReadOnlyDictionary<string, string>
cancellationToken CancellationToken

Returns

Task<TokenRequestValidationResult>

Remarks

What the token endpoint calls, so the validated request carries the credential as Duende's ValidatedRequest.Secret. A validator written before it answers through the overload above, and the credential is set on what it returns.

ValidateAsync(Client, IReadOnlyDictionary<string, string>, CancellationToken)

Validates a token request from an authenticated client, by its grant_type.

Task<TokenRequestValidationResult> ValidateAsync(Client client, IReadOnlyDictionary<string, string> parameters, CancellationToken cancellationToken = default)

Parameters

client Client

The authenticated client making the request.

parameters IReadOnlyDictionary<string, string>

The request's form parameters.

cancellationToken CancellationToken

Cancels the validation.

Returns

Task<TokenRequestValidationResult>

The validated request, or the error to answer with.