你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AuthenticationTokenProvider.GetTokenAsync Method

Definition

Gets the token.

public abstract System.Threading.Tasks.ValueTask<System.ClientModel.Primitives.AuthenticationToken> GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions options, System.Threading.CancellationToken cancellationToken);
public abstract System.Threading.Tasks.ValueTask<System.ClientModel.Primitives.AccessToken> GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken);
abstract member GetTokenAsync : System.ClientModel.Primitives.GetTokenOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.ClientModel.Primitives.AuthenticationToken>
abstract member GetTokenAsync : System.ClientModel.Primitives.GetTokenOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.ClientModel.Primitives.AccessToken>
Public MustOverride Function GetTokenAsync (options As GetTokenOptions, cancellationToken As CancellationToken) As ValueTask(Of AuthenticationToken)
Public MustOverride Function GetTokenAsync (properties As GetTokenOptions, cancellationToken As CancellationToken) As ValueTask(Of AccessToken)

Parameters

options
GetTokenOptions

The options used by the AuthenticationTokenProvider to make a token request.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Applies to