Class BackchannelAuthenticationRequestValidator
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Duende's default backchannel authentication request validator.
public class BackchannelAuthenticationRequestValidator : IBackchannelAuthenticationRequestValidator
- Inheritance
-
BackchannelAuthenticationRequestValidator
- Implements
- Inherited Members
Remarks
In the ASP.NET Core assembly rather than with its interface, because it reads this server's issuer — an
id_token_hint is checked against it — and the connection's client certificate, which decides whether a pushed
token could honour the client's sender constraint.
The checks are the endpoint's until 0.121.0, moved here in the endpoint's order, with Duende's four that it did not
make: a scope is required and bounded, openid missing is invalid_request rather than
invalid_scope, login_hint and login_hint_token are bounded, and a user validator error CIBA does not
define is unknown_user_id.
Constructors
BackchannelAuthenticationRequestValidator(IBackchannelAuthenticationUserValidator, ICustomBackchannelAuthenticationValidator, IResourceValidator, ITokenValidator, IRequestObjectValidator, IIssuerNameService, IHttpContextAccessor, IOptions<IdentityServerOptions>, ILogger<BackchannelAuthenticationRequestValidator>)
Creates the validator, as the container resolves it.
public BackchannelAuthenticationRequestValidator(IBackchannelAuthenticationUserValidator users, ICustomBackchannelAuthenticationValidator customValidator, IResourceValidator resourceValidator, ITokenValidator tokens, IRequestObjectValidator requestObjects, IIssuerNameService issuers, IHttpContextAccessor httpContextAccessor, IOptions<IdentityServerOptions> options, ILogger<BackchannelAuthenticationRequestValidator> logger)
Parameters
usersIBackchannelAuthenticationUserValidatorResolves the request's hint to the user it names.
customValidatorICustomBackchannelAuthenticationValidatorThe host's own checks, asked last.
resourceValidatorIResourceValidatorChecks the requested scopes and resource indicators against the client.
tokensITokenValidatorValidates an
id_token_hintas one this server issued.requestObjectsIRequestObjectValidatorVerifies a signed request object and reads its parameters.
issuersIIssuerNameServiceNames this server as the issuer an
id_token_hintmust come from.httpContextAccessorIHttpContextAccessorReaches the request in flight: its issuer and its connection's client certificate.
optionsIOptions<IdentityServerOptions>The server options: the input length limits, and the
CibaandMutualTlssettings.loggerILogger<BackchannelAuthenticationRequestValidator>Receives why a request was refused.
Methods
ValidateRequestAsync(IReadOnlyDictionary<string, string>, ClientSecretValidationResult, CancellationToken)
Validates a backchannel authentication request in the order IBackchannelAuthenticationRequestValidator describes; a refusal is a result carrying the error, not an exception.
public virtual Task<BackchannelAuthenticationRequestValidationResult> ValidateRequestAsync(IReadOnlyDictionary<string, string> parameters, ClientSecretValidationResult clientValidationResult, CancellationToken ct)
Parameters
parametersIReadOnlyDictionary<string, string>The request's form parameters.
clientValidationResultClientSecretValidationResultThe client's authentication, already succeeded.
ctCancellationTokenCancels the validation.
Returns
- Task<BackchannelAuthenticationRequestValidationResult>
The validated request, or the error the client is answered with.
Exceptions
- ArgumentNullException
parametersorclientValidationResultis null.