Table of Contents

Class ClientSecretValidator

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

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public sealed class ClientSecretValidator : IClientSecretValidator
Inheritance
ClientSecretValidator
Implements
Inherited Members

Constructors

ClientSecretValidator(IClientStore, ISecretsListValidator, IEventService)

Creates the validator.

public ClientSecretValidator(IClientStore clients, ISecretsListValidator secretValidator, IEventService events)

Parameters

clients IClientStore

The registered clients.

secretValidator ISecretsListValidator

Checks the credential against the client's registered secrets.

events IEventService

Where the client authentication success and failure events go.

Methods

ValidateAsync(ParsedSecret, CancellationToken)

Finds the client the credential names and checks the credential against the client's secrets.

public Task<ClientSecretValidationResult> ValidateAsync(ParsedSecret parsedSecret, CancellationToken cancellationToken = default)

Parameters

parsedSecret ParsedSecret

The client id and credential a secret parser read off the request.

cancellationToken CancellationToken

Cancels the client lookup and the secret validation.

Returns

Task<ClientSecretValidationResult>

The authenticated client, or the error to answer with.

Remarks

Refuses a missing client id, an unknown or disabled client, and a client registered for another protocol. A client that does not require a secret is identified without its credential being checked. Every failure answers invalid_client; the reason is on the failure event, not the result.

Exceptions

ArgumentNullException

parsedSecret is null.