Table of Contents

Interface ISecretValidator

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

Checks one kind of presented credential against stored secrets.

public interface ISecretValidator

Remarks

An implementation handles the Type values it understands and returns failure for everything else, so that adding a credential kind does not mean editing the ones already there.

Methods

ValidateAsync(IEnumerable<Secret>, ParsedSecret, CancellationToken)

Checks the presented credential against the stored secrets.

Task<SecretValidationResult> ValidateAsync(IEnumerable<Secret> secrets, ParsedSecret parsedSecret, CancellationToken cancellationToken = default)

Parameters

secrets IEnumerable<Secret>

The stored secrets of the client or API — only unexpired ones, when called by SecretValidator.

parsedSecret ParsedSecret

The credential a secret parser read off the request.

cancellationToken CancellationToken

Cancels the check.

Returns

Task<SecretValidationResult>

Success when the credential matched one of secrets; failure otherwise, and for a credential type this validator does not handle.