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
secretsIEnumerable<Secret>The stored secrets of the client or API — only unexpired ones, when called by SecretValidator.
parsedSecretParsedSecretThe credential a secret parser read off the request.
cancellationTokenCancellationTokenCancels 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.