Skip to main content

Definition

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

Syntax

Summary

Runs the RFC 6749 section 6 refresh token grant: exchange the refresh token on a cached TokenContainer for a fresh access token, preserving rotation and the client and server identity the container already carried.

Remarks

Per specs/v3/AUTHENTICATION.md “Grants → Refresh”: a response that carries a new refresh_token replaces the old one, and a response that omits it leaves the previous one in force — that rule lives in String), which this class calls with the container’s current refresh token. The caller owns persistence; this class never touches the cache. Per AUTH-12 the only thing logged is the redacted shape from TokenContainer).

Examples

Constructors

.ctor

Initializes a new instance of the RefreshTokenGrant class.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

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

RefreshAsync

Exchanges the refresh token on current for a fresh access token.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Authentication.TokenContainer> A new container carrying the fresh access token and the effective refresh token: the rotated one when the server issued it, the previous one when the server omitted it.

Exceptions

Examples

Remarks

The token endpoint authentication method comes from TokenEndpointAuthMethod when the container recorded one, so a cold start refreshes exactly the way the original grant authenticated; absent that, a container with a client secret uses TokenEndpointClient.AuthMethodClientSecretPost and one without uses TokenEndpointClient.AuthMethodNone. scope is echoed back only when the container recorded one, because RFC 6749 section 6 treats an absent scope as “the scope originally granted”.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?