Table of Contents

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

clients IClientStore

The registered clients.

resourceValidator IResourceValidator

Validates the requested scopes and resources.

options IOptions<IdentityServerOptions>

This server's options.

customValidator ICustomAuthorizeRequestValidator

The host's own checks, asked last; the default accepts everything.

redirectUris IRedirectUriValidator

Which 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

parameters IReadOnlyDictionary<string, string>

The request's parameters, the request object's merged in.

subject ClaimsPrincipal

The signed-in user, when there is one.

authorizeRequestType AuthorizeRequestType

Where the request came from.

requestObjectValues IEnumerable<Claim>

The claims of the request object, for RequestObjectValues and the redirect URI validator's RequestObjectValues.

cancellationToken CancellationToken

Cancels the validation.

Returns

Task<AuthorizeRequestValidationResult>

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

parameters or requestObjectValues is null.

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

parameters IReadOnlyDictionary<string, string>

The request's parameters.

subject ClaimsPrincipal

The signed-in user, when there is one.

authorizeRequestType AuthorizeRequestType

Where 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).

cancellationToken CancellationToken

Cancels the validation.

Returns

Task<AuthorizeRequestValidationResult>