Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.Object

Syntax

Summary

The RFC 6749 section 5.1 successful token response returned from a token endpoint.

Remarks

Deserialized exclusively through OutboundOAuthJsonContext (AOT: JSON source-gen; no reflection). This is the RFC 6749 wire shape only; it is <em>not</em> the SDK TokenContainer cache/runtime format, which is PascalCase and additionally carries ObtainedAt. String) is the single place that conversion happens.

Examples

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

AccessToken

Gets or sets the issued access token.

Syntax

Property Value

Type: string

ExpiresIn

Gets or sets the lifetime, in seconds, of TokenEndpointResponse.AccessToken, or null when the server did not advertise one.

Syntax

Property Value

Type: System.Nullable<int>?

RefreshToken

Gets or sets the refresh token, or null when the server did not issue one.

Syntax

Property Value

Type: string?

Scope

Gets or sets the space-delimited scope actually granted, or null when the server did not echo it back.

Syntax

Property Value

Type: string?

TokenType

Gets or sets the token type, such as Bearer.

Syntax

Property Value

Type: string

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

ToTokenContainer

Maps this wire response onto the SDK TokenContainer the cache and the outbound handler read, stamping ObtainedAt at the moment of the call.

Syntax

Parameters

Returns

Type: ModelContextProtocol.Authentication.TokenContainer A container carrying this response’s access token, lifetime, and scope, the effective refresh token, and the client and server identity the caller supplied.

Exceptions

Examples

Remarks

RFC 6749 section 6 makes refresh_token optional on a refresh response, so an omitted value means “keep the one you have”, never “you no longer have one”; that rule lives here so no grant has to remember it. An absent token_type becomes ODataMcpAuthConstants.BearerScheme, because the SDK container requires one and every grant this package implements is a bearer grant.