Class DefaultAuthorizeRequestValidator
- 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 DefaultAuthorizeRequestValidator : IAuthorizeRequestValidator
- Inheritance
-
DefaultAuthorizeRequestValidator
- Implements
- Inherited Members
Constructors
DefaultAuthorizeRequestValidator(IClientStore, IResourceValidator, IOptions<IdentityServerOptions>, ICustomAuthorizeRequestValidator?, IRedirectUriValidator?)
public DefaultAuthorizeRequestValidator(IClientStore clients, IResourceValidator resourceValidator, IOptions<IdentityServerOptions> options, ICustomAuthorizeRequestValidator? customValidator = null, IRedirectUriValidator? redirectUris = null)
Parameters
clientsIClientStoreThe registered clients.
resourceValidatorIResourceValidatorValidates the requested scopes and resources.
optionsIOptions<IdentityServerOptions>This server's options.
customValidatorICustomAuthorizeRequestValidatorThe host's own checks, asked last; the default accepts everything.
redirectUrisIRedirectUriValidatorWhich redirect URIs a client may use; the default is the client's registered ones.
Methods
ValidateAsync(IReadOnlyDictionary<string, string>, ClaimsPrincipal?, AuthorizeRequestType, IEnumerable<Claim>, CancellationToken)
Validates a request whose parameters were read, wholly or partly, from a request object.
public Task<AuthorizeRequestValidationResult> ValidateAsync(IReadOnlyDictionary<string, string> parameters, ClaimsPrincipal? subject, AuthorizeRequestType authorizeRequestType, IEnumerable<Claim> requestObjectValues, CancellationToken cancellationToken)
Parameters
parametersIReadOnlyDictionary<string, string>The request's parameters, the request object's merged in.
subjectClaimsPrincipalThe signed-in user, when there is one.
authorizeRequestTypeAuthorizeRequestTypeWhere the request came from.
requestObjectValuesIEnumerable<Claim>The claims of the request object, for RequestObjectValues and the redirect URI validator's RequestObjectValues.
cancellationTokenCancellationTokenCancels the validation.
Returns
Remarks
This server's: Duende's validator reads the request object itself, and here the endpoint resolves it first and hands its claims on through this. A validator that does not implement it is asked without them.
Exceptions
- ArgumentNullException
parametersorrequestObjectValuesisnull.
ValidateAsync(IReadOnlyDictionary<string, string>, ClaimsPrincipal?, AuthorizeRequestType, CancellationToken)
public Task<AuthorizeRequestValidationResult> ValidateAsync(IReadOnlyDictionary<string, string> parameters, ClaimsPrincipal? subject, AuthorizeRequestType authorizeRequestType = AuthorizeRequestType.Authorize, CancellationToken cancellationToken = default)
Parameters
parametersIReadOnlyDictionary<string, string>The request's parameters.
subjectClaimsPrincipalThe signed-in user, when there is one.
authorizeRequestTypeAuthorizeRequestTypeWhere the request came from, as Duende's validator is told: a push is validated before it is stored, and the redirect URI validator may treat a pushed request differently (
AllowUnregisteredPushedRedirectUris).cancellationTokenCancellationTokenCancels the validation.