Share via


UsernamePasswordCredential.AuthenticateAsync Method

Definition

Overloads

AuthenticateAsync(CancellationToken)

Authenticates the user using the specified username and password.

AuthenticateAsync(TokenRequestContext, CancellationToken)

Authenticates the user using the specified username and password.

AuthenticateAsync(CancellationToken)

Source:
UsernamePasswordCredential.cs
Source:
UsernamePasswordCredential.cs

Authenticates the user using the specified username and password.

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 of the authenticated account.

Applies to

AuthenticateAsync(TokenRequestContext, CancellationToken)

Source:
UsernamePasswordCredential.cs
Source:
UsernamePasswordCredential.cs

Authenticates the user using the specified username and password.

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.

Applies to