OAuth2Manager.RequestTokenAsync 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
RequestTokenAsync(Uri, TokenRequestParams) |
Initiates an access token request. |
RequestTokenAsync(Uri, TokenRequestParams, ClientAuthentication) |
Initiates an access token request with client authentication. |
RequestTokenAsync(Uri, TokenRequestParams)
Initiates an access token request.
public:
static IAsyncOperation<TokenRequestResult ^> ^ RequestTokenAsync(Uri ^ tokenEndpoint, TokenRequestParams ^ params);
/// [Windows.Foundation.Metadata.Overload("RequestTokenAsync")]
static IAsyncOperation<TokenRequestResult> RequestTokenAsync(Uri const& tokenEndpoint, TokenRequestParams const& params);
[Windows.Foundation.Metadata.Overload("RequestTokenAsync")]
public static IAsyncOperation<TokenRequestResult> RequestTokenAsync(System.Uri tokenEndpoint, TokenRequestParams params);
function requestTokenAsync(tokenEndpoint, params)
Public Shared Function RequestTokenAsync (tokenEndpoint As Uri, params As TokenRequestParams) As IAsyncOperation(Of TokenRequestResult)
Parameters
- params
- TokenRequestParams
The TokenRequestParams containing the token request information.
Returns
An IAsyncOperation that returns a TokenRequestResult.
- Attributes
Examples
See the Exchange authorization code for access token section of Implement OAuth functionality in Windows apps for an example of how to request an access token.
Applies to
RequestTokenAsync(Uri, TokenRequestParams, ClientAuthentication)
Initiates an access token request with client authentication.
public:
static IAsyncOperation<TokenRequestResult ^> ^ RequestTokenAsync(Uri ^ tokenEndpoint, TokenRequestParams ^ params, ClientAuthentication ^ clientAuth);
/// [Windows.Foundation.Metadata.Overload("RequestTokenAsync2")]
static IAsyncOperation<TokenRequestResult> RequestTokenAsync(Uri const& tokenEndpoint, TokenRequestParams const& params, ClientAuthentication const& clientAuth);
[Windows.Foundation.Metadata.Overload("RequestTokenAsync2")]
public static IAsyncOperation<TokenRequestResult> RequestTokenAsync(System.Uri tokenEndpoint, TokenRequestParams params, ClientAuthentication clientAuth);
function requestTokenAsync(tokenEndpoint, params, clientAuth)
Public Shared Function RequestTokenAsync (tokenEndpoint As Uri, params As TokenRequestParams, clientAuth As ClientAuthentication) As IAsyncOperation(Of TokenRequestResult)
Parameters
- params
- TokenRequestParams
The TokenRequestParams containing the token request information.
- clientAuth
- ClientAuthentication
The ClientAuthentication containing the client authentication information.
Returns
An IAsyncOperation that returns a TokenRequestResult.
- Attributes
Examples
See the Exchange authorization code for access token section of Implement OAuth functionality in Windows apps for an example of how to use this method to request an access token.