Udostępnij za pośrednictwem


WebAuthenticationCoreManager.RequestTokenAsync Method

Definition

Overloads

RequestTokenAsync(WebTokenRequest)

Asynchronously requests a token from a web account provider. If necessary, the user is prompted to enter their credentials.

RequestTokenAsync(WebTokenRequest, WebAccount)

Asynchronously requests a token from a web account provider. If necessary, the user is prompted to enter their credentials.

RequestTokenAsync(WebTokenRequest)

Asynchronously requests a token from a web account provider. If necessary, the user is prompted to enter their credentials.

public:
 static IAsyncOperation<WebTokenRequestResult ^> ^ RequestTokenAsync(WebTokenRequest ^ request);
/// [Windows.Foundation.Metadata.Overload("RequestTokenAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<WebTokenRequestResult> RequestTokenAsync(WebTokenRequest const& request);
[Windows.Foundation.Metadata.Overload("RequestTokenAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<WebTokenRequestResult> RequestTokenAsync(WebTokenRequest request);
function requestTokenAsync(request)
Public Shared Function RequestTokenAsync (request As WebTokenRequest) As IAsyncOperation(Of WebTokenRequestResult)

Parameters

request
WebTokenRequest

The web token request.

Returns

An asynchronous request operation. On successful completion, contains a WebTokenRequestResult object representing the result of the web token request.

Attributes

Remarks

This method cannot be called from desktop apps or from background threads of UWP apps. For an equivalent of this method for desktop apps, see IWebAuthenticationCoreManagerInterop::RequestTokenForWindowAsync.

See also

Applies to

RequestTokenAsync(WebTokenRequest, WebAccount)

Asynchronously requests a token from a web account provider. If necessary, the user is prompted to enter their credentials.

public:
 static IAsyncOperation<WebTokenRequestResult ^> ^ RequestTokenAsync(WebTokenRequest ^ request, WebAccount ^ webAccount);
/// [Windows.Foundation.Metadata.Overload("RequestTokenWithWebAccountAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<WebTokenRequestResult> RequestTokenAsync(WebTokenRequest const& request, WebAccount const& webAccount);
[Windows.Foundation.Metadata.Overload("RequestTokenWithWebAccountAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<WebTokenRequestResult> RequestTokenAsync(WebTokenRequest request, WebAccount webAccount);
function requestTokenAsync(request, webAccount)
Public Shared Function RequestTokenAsync (request As WebTokenRequest, webAccount As WebAccount) As IAsyncOperation(Of WebTokenRequestResult)

Parameters

request
WebTokenRequest

The web token request.

webAccount
WebAccount

The web account for the request.

Returns

An asynchronous request operation. On successful completion, contains a WebTokenRequestResult object representing the result of the web token request.

Attributes

Remarks

This method cannot be called from desktop apps or from background threads of UWP apps. For an equivalent of this method for desktop apps, see IWebAuthenticationCoreManagerInterop::RequestTokenWithWebAccountForWindowAsync.

See also

M:Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager.RequestTokenAsync(Windows.Security.Authentication.Web.Core.WebTokenRequest)

IWebAuthenticationCoreManagerInterop::RequestTokenWithWebAccountForWindowAsync

IWebAuthenticationCoreManagerInterop interface

Applies to