Class DefaultScopeParser
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.Core.dll
Takes every scope value as it is. Duende's default, open to be derived from to parse some of them.
public class DefaultScopeParser : IScopeParser
- Inheritance
-
DefaultScopeParser
- Implements
- Inherited Members
Remarks
Duende's: ParseScopeValues(IEnumerable<string>) hands each value to ParseScopeValue(ParseScopeContext), which does nothing here, so a value is its own name. A derived parser overrides ParseScopeValue(ParseScopeContext) and answers through the context — SetParsedValues(string, string) for a name and parameter, SetError(string) to refuse the value, or SetIgnore() to drop it from the request.
Constructors
DefaultScopeParser(ILogger<DefaultScopeParser>)
Creates the parser.
public DefaultScopeParser(ILogger<DefaultScopeParser> logger)
Parameters
loggerILogger<DefaultScopeParser>Where a value a parser chose to ignore is logged, at debug level.
Methods
ParseScopeValue(ParseScopeContext)
Parses one value. Does nothing, so the value stands as its own name.
public virtual void ParseScopeValue(DefaultScopeParser.ParseScopeContext scopeContext)
Parameters
scopeContextDefaultScopeParser.ParseScopeContext
ParseScopeValues(IEnumerable<string>)
public virtual ParsedScopesResult ParseScopeValues(IEnumerable<string> scopeValues)
Parameters
scopeValuesIEnumerable<string>
Returns
Remarks
Duende's, measured: a null collection is one error, named null; each value is parsed in turn, and a value
the parser named nothing for is its own name.