Table of Contents

Class DefaultResourceValidator

Namespace
Duende.IdentityServer.Validation
Assembly
Duende.IdentityServer.dll

Default implementation of IResourceValidator.

public class DefaultResourceValidator : IResourceValidator
Inheritance
DefaultResourceValidator
Implements
Inherited Members

Constructors

DefaultResourceValidator(IResourceStore, IScopeParser, ILogger<DefaultResourceValidator>)

Initializes a new instance of the DefaultResourceValidator class.

public DefaultResourceValidator(IResourceStore store, IScopeParser scopeParser, ILogger<DefaultResourceValidator> logger)

Parameters

store IResourceStore

The store.

scopeParser IScopeParser
logger ILogger<DefaultResourceValidator>

The logger.

Methods

IsClientAllowedApiScopeAsync(Client, ApiScope)

Determines if client is allowed access to the API scope.

protected virtual Task<bool> IsClientAllowedApiScopeAsync(Client client, ApiScope apiScope)

Parameters

client Client
apiScope ApiScope

Returns

Task<bool>

IsClientAllowedIdentityResourceAsync(Client, IdentityResource)

Determines if client is allowed access to the identity scope.

protected virtual Task<bool> IsClientAllowedIdentityResourceAsync(Client client, IdentityResource identity)

Parameters

client Client
identity IdentityResource

Returns

Task<bool>

IsClientAllowedOfflineAccessAsync(Client)

Validates if the client is allowed offline_access.

protected virtual Task<bool> IsClientAllowedOfflineAccessAsync(Client client)

Parameters

client Client

Returns

Task<bool>

ValidateRequestedResourcesAsync(ResourceValidationRequest)

public virtual Task<ResourceValidationResult> ValidateRequestedResourcesAsync(ResourceValidationRequest request)

Parameters

request ResourceValidationRequest

Returns

Task<ResourceValidationResult>

ValidateScopeAsync(Client, Resources, ParsedScopeValue, ResourceValidationResult)

Validates that the requested scopes is contained in the store, and the client is allowed to request it.

protected virtual Task ValidateScopeAsync(Client client, Resources resourcesFromStore, ParsedScopeValue requestedScope, ResourceValidationResult result)

Parameters

client Client
resourcesFromStore Resources
requestedScope ParsedScopeValue
result ResourceValidationResult

Returns

Task