Definition
Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.ObjectSyntax
Summary
Everything the outbound OAuth discovery algorithm learned about a protected OData service: theWWW-Authenticate challenge it started from, the RFC 9728 protected resource metadata it found (if
any), the authorization server it selected, and the grants, scope, and RFC 8707 resource a grant needs.
Remarks
Produced exclusively by CancellationToken), which never returns an instance without an authorization server: discovery fails first rather than handing a caller a half-populated result. PerAUTH-13 the challenge client_id is reachable
only as OAuthChallenge.ResourceClientId through OAuthDiscoveryResult.Challenge, so nothing on this
type can be mistaken for the client id this process authenticates with.
Examples
Constructors
.ctor
Initializes a new instance of the OAuthDiscoveryResult class.Syntax
Parameters
Exceptions
.ctor Inherited
Inherited from
objectSyntax
Properties
AdvertisedGrants
Gets the grant types OAuthDiscoveryResult.AuthorizationServer advertises, or an empty list when it advertises none.Syntax
Property Value
Type:System.Collections.Generic.IReadOnlyList<string>
Remarks
Nevernull, so grant selection can enumerate it without a null check.
AuthorizationServer
Gets the authorization server metadata document discovery selected.Syntax
Property Value
Type:Microsoft.OData.Mcp.Authentication.Outbound.AuthorizationServerMetadata
Remarks
Guaranteed to carry an absolutetoken_endpoint, because
AuthorizationServerMetadataClient rejects a document without one.
AuthorizationServerBase
Gets the candidate base URI that OAuthDiscoveryResult.AuthorizationServer was discovered from.Syntax
Property Value
Type:System.Uri
Remarks
This is the operator’s--auth-server value, a protected resource metadata
authorization_servers entry, or a remainder stripped from the challenge
authorization_uri; it is not necessarily the issuer the document advertises.
Challenge
Gets theBearer challenge discovery started from, or null when the response
carried no Bearer challenge.
Syntax
Property Value
Type:Microsoft.OData.Mcp.Authentication.Outbound.OAuthChallenge?
ChallengeScope
Gets the space-delimitedscope the challenge asked for, or null when it
asked for none.
Syntax
Property Value
Type:string?
Remarks
This is the highest priority input to scope resolution per step 8 of the discovery algorithm.ProtectedResource
Gets the RFC 9728 protected resource metadata document, ornull when every
candidate was missing, unauthorized, or unparseable.
Syntax
Property Value
Type:ModelContextProtocol.Authentication.ProtectedResourceMetadata?
Remarks
Anull value is normal and non-fatal per AUTH-14; it means discovery
continued from the challenge and the operator’s overrides.
Resource
Gets the RFC 8707 resource indicator a token request should ask for, ornull when
no token request should carry one.
Syntax
Property Value
Type:System.Uri?
Remarks
Resolved per step 8b of the discovery algorithm: the protected resource metadataresource when
it is absolute, else the operator’s --resource, else null. There is
deliberately no origin fallback: RFC 8707 resource is only meaningful when the resource itself
published it or the operator named it, and an invented audience is rejected by strict authorization
servers that would otherwise have honored scope alone.
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
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?