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
clientClientsecretParsedSecretparametersIReadOnlyDictionary<string, string>cancellationTokenCancellationToken
Returns
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
clientClientThe authenticated client making the request.
parametersIReadOnlyDictionary<string, string>The request's form parameters.
cancellationTokenCancellationTokenCancels the validation.
Returns
- Task<TokenRequestValidationResult>
The validated request, or the error to answer with.