Definition
Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.ObjectSyntax
Summary
Resolves the space-delimited OAuthscope a token request should ask for, per step 8 of the
discovery algorithm and matching the SDK 2.2 ScopeSelectorDelegate order exactly.
Remarks
Per Key Decision 9 ofspecs/v3/AUTHENTICATION.md, the base scope order is: the
WWW-Authenticate challenge scope, then RFC 9728 protected resource metadata
scopes_supported, then the operator’s --scopes, then no scope at all.
offline_access is appended whenever the authorization server or protected resource metadata
advertises it, or the authorization server advertises the refresh_token grant, so an interactive
grant can refresh instead of re-prompting. Finally, OutboundOAuthOptions.ScopeSelector — the
SDK’s ScopeSelectorDelegate reused as-is — runs last and may remove
offline_access, which this type logs a warning about rather than silently accepting.
Examples
Constructors
.ctor
Initializes a new instance of the ScopeResolver class.Syntax
Parameters
Exceptions
.ctor Inherited
Inherited from
objectSyntax
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Resolve
Resolves the scope a token request should ask for, per step 8 of the discovery algorithm.Syntax
Parameters
Returns
Type:string?
The resolved space-delimited scope, or null when nothing resolves to a non-empty
scope.
Exceptions
Examples
Remarks
OutboundOAuthOptions.ScopeSelector receives the individual scope tokens as an [IReadOnlyCollection1](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1) — exactly the SDK 2.2 ScopeSelectorDelegate`
signature — and its returned scopes are re-joined with single spaces.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?