다음을 통해 공유


DeviceCodeCredential.AuthenticateAsync Method

Definition

Overloads

AuthenticateAsync(CancellationToken)

Interactively authenticates a user via the default browser.

AuthenticateAsync(TokenRequestContext, CancellationToken)

Interactively authenticates a user via the default browser.

AuthenticateAsync(CancellationToken)

Source:
DeviceCodeCredential.cs
Source:
DeviceCodeCredential.cs

Interactively authenticates a user via the default browser.

public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member AuthenticateAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord>
override this.AuthenticateAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord>
Public Overridable Function AuthenticateAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of AuthenticationRecord)

Parameters

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

The AuthenticationRecord which can be used to silently authenticate the account on future execution of credentials using the same persisted token cache.

Exceptions

Thrown when the authentication failed.

Applies to

AuthenticateAsync(TokenRequestContext, CancellationToken)

Source:
DeviceCodeCredential.cs
Source:
DeviceCodeCredential.cs

Interactively authenticates a user via the default browser.

public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default);
abstract member AuthenticateAsync : Azure.Core.TokenRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord>
override this.AuthenticateAsync : Azure.Core.TokenRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord>
Public Overridable Function AuthenticateAsync (requestContext As TokenRequestContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AuthenticationRecord)

Parameters

requestContext
TokenRequestContext

The details of the authentication request.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

The AuthenticationRecord of the authenticated account.

Exceptions

Thrown when the authentication failed.

Applies to