InteractiveBrowserCredential.AuthenticateAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AuthenticateAsync(CancellationToken) |
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetTokenAsync(TokenRequestContext, CancellationToken). |
AuthenticateAsync(PopTokenRequestContext, CancellationToken) |
Interactively authenticates a user via the default browser. |
AuthenticateAsync(TokenRequestContext, CancellationToken) |
Interactively authenticates a user via the default browser. |
AuthenticateAsync(CancellationToken)
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetTokenAsync(TokenRequestContext, CancellationToken).
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 result of the authentication request, containing the acquired AccessToken, and the AuthenticationRecord which can be used to silently authenticate the account.
Applies to
AuthenticateAsync(PopTokenRequestContext, CancellationToken)
Interactively authenticates a user via the default browser.
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync (Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default);
abstract member AuthenticateAsync : Azure.Core.PopTokenRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord>
override this.AuthenticateAsync : Azure.Core.PopTokenRequestContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord>
Public Overridable Function AuthenticateAsync (requestContext As PopTokenRequestContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AuthenticationRecord)
Parameters
- requestContext
- PopTokenRequestContext
The details of the authentication request.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
The AuthenticationRecord of the authenticated account.
Applies to
AuthenticateAsync(TokenRequestContext, CancellationToken)
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.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應