Class SecretParser
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.AspNetCore.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 SecretParser : ISecretsListParser
- Inheritance
-
SecretParser
- Implements
- Inherited Members
Constructors
SecretParser(IEnumerable<ISecretParser>, ILogger<ISecretsListParser>)
Collects the registered parsers, asked in the order given.
public SecretParser(IEnumerable<ISecretParser> parsers, ILogger<ISecretsListParser> logger)
Parameters
parsersIEnumerable<ISecretParser>Every registered ISecretParser.
loggerILogger<ISecretsListParser>Receives the kind of credential parsed and whose it is.
Methods
GetAvailableAuthenticationMethods()
The authentication methods the registered parsers between them support.
public IEnumerable<string> GetAvailableAuthenticationMethods()
Returns
ParseAsync(HttpContext, CancellationToken)
The credential the first registered parser recognises, or null when none recognises one.
public Task<ParsedSecret?> ParseAsync(HttpContext context, CancellationToken cancellationToken = default)
Parameters
contextHttpContextThe request carrying the credential.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<ParsedSecret>
The credential, unchecked, or null.
Exceptions
- ArgumentNullException
contextis null.