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
storeIResourceStoreThe store.
scopeParserIScopeParserloggerILogger<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
clientClientapiScopeApiScope
Returns
IsClientAllowedIdentityResourceAsync(Client, IdentityResource)
Determines if client is allowed access to the identity scope.
protected virtual Task<bool> IsClientAllowedIdentityResourceAsync(Client client, IdentityResource identity)
Parameters
clientClientidentityIdentityResource
Returns
IsClientAllowedOfflineAccessAsync(Client)
Validates if the client is allowed offline_access.
protected virtual Task<bool> IsClientAllowedOfflineAccessAsync(Client client)
Parameters
clientClient
Returns
ValidateRequestedResourcesAsync(ResourceValidationRequest)
public virtual Task<ResourceValidationResult> ValidateRequestedResourcesAsync(ResourceValidationRequest request)
Parameters
requestResourceValidationRequest
Returns
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
clientClientresourcesFromStoreResourcesrequestedScopeParsedScopeValueresultResourceValidationResult