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
clientsIClientStoreThe registered clients.
secretValidatorISecretsListValidatorChecks the credential against the client's registered secrets.
eventsIEventServiceWhere 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
parsedSecretParsedSecretThe client id and credential a secret parser read off the request.
cancellationTokenCancellationTokenCancels 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
parsedSecretisnull.