Class DefaultResourceValidator
- 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 DefaultResourceValidator : IResourceValidator
- Inheritance
-
DefaultResourceValidator
- Implements
- Inherited Members
Constructors
DefaultResourceValidator(IResourceStore, IScopeParser?)
public DefaultResourceValidator(IResourceStore resourceStore, IScopeParser? scopeParser = null)
Parameters
resourceStoreIResourceStoreThe resources the scopes name.
scopeParserIScopeParserReads each scope value into the scope it asks for; the default takes each as it is.
Methods
ValidateAsync(Client, IEnumerable<string>, CancellationToken)
public Task<ResourceValidationResult> ValidateAsync(Client client, IEnumerable<string> requestedScopes, CancellationToken cancellationToken = default)
Parameters
clientClientrequestedScopesIEnumerable<string>cancellationTokenCancellationToken
Returns
Remarks
Duende 8.0.1's DefaultResourceValidator, measured: the scope values are parsed first, and a value the parser
refuses makes every refused value an invalid scope, and nothing more is checked. Each parsed value is then checked
by the scope it names — against the client's allowed scopes and the resource store — and kept as it was sent, so
RawScopeValues grants the raw value and Resources holds the
scope. A value refused here is invalid by its raw value.