Class PostBodySecretParser
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Reads client_secret_post credentials from the form body.
public sealed class PostBodySecretParser : ISecretParser
- Inheritance
-
PostBodySecretParser
- Implements
- Inherited Members
Constructors
PostBodySecretParser(IOptions<IdentityServerOptions>?)
Creates the parser.
public PostBodySecretParser(IOptions<IdentityServerOptions>? options = null)
Parameters
optionsIOptions<IdentityServerOptions>The server options, whose input length limits bound the client id and secret; null holds to the defaults.
Properties
AuthenticationMethods
The token_endpoint_auth_methods_supported values this parser implements.
public IReadOnlyCollection<string> AuthenticationMethods { get; }
Property Value
Remarks
A collection rather than one value, because how a credential is presented and what it is checked against are not the same question. RFC 8705 defines two methods that arrive identically — a certificate on the connection — and differ only in whether the registration names the certificate or the name it bears.
Methods
ParseAsync(HttpContext, CancellationToken)
Returns the credential this parser recognises, or null when the request carries none of its kind.
public Task<ParsedSecret?> ParseAsync(HttpContext context, CancellationToken cancellationToken = default)
Parameters
contextHttpContextcancellationTokenCancellationToken
Returns
Remarks
A client_id with no client_secret is still a credential, with a null secret: a public client's.
Exceptions
- ArgumentNullException
contextis null.