Share via


TokenRequestParams Class

Definition

A class that provides methods to create a token request parameter object. This is described by the section 4.1.3 of RFC 6749.

Note

This object is used to request an access_token from the server.

public ref class TokenRequestParams sealed
/// [Windows.Foundation.Metadata.Activatable(Microsoft.Security.Authentication.OAuth.ITokenRequestParamsFactory, 65536, "Microsoft.Security.Authentication.OAuth.OAuthContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Security.Authentication.OAuth.OAuthContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TokenRequestParams final
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.Security.Authentication.OAuth.ITokenRequestParamsFactory), 65536, "Microsoft.Security.Authentication.OAuth.OAuthContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Security.Authentication.OAuth.OAuthContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TokenRequestParams
function TokenRequestParams(grantType)
Public NotInheritable Class TokenRequestParams
Inheritance
Object Platform::Object IInspectable TokenRequestParams
Attributes

Constructors

TokenRequestParams(String)

Creates a new instance of the TokenRequestParams class.

Properties

AdditionalParams

Additional parameters included in the query string of the request URL.

ClientId

Specifies the client_id parameter of the token request.

Code

Specifies the code parameter of the token request.

CodeVerifier

Specifies the code_verifier parameter of the token request. This property is required when the grant type is "authorization_code" and a code challenge was included in the authorization request. This is described by the section 4.1 of RFC 7636.

GrantType

Specifies the required grant_type parameter of the token request.

Password

Specifies the password parameter of the token request.

RedirectUri

Specifies the redirect_uri parameter of the token request.

RefreshToken

Specifies the refresh_token parameter of the token request.

Scope

Specifies the scope parameter of the token request.

Username

Specifies the username parameter of the token request.

Methods

CreateForAuthorizationCodeRequest(AuthResponse)

A helper method to create for an authorization code grant request (authorization_code grant type) with required parameters extracted from the authorization response.

CreateForClientCredentials()

A helper method to create for a client credentials grant request (client_credentials grant type) with required parameters.

CreateForExtension(Uri)

A helper method to create for an extension grant request, using the provided URI for the grant type.

CreateForRefreshToken(String)

A helper method to create for an access token refresh request (refresh_token grant type) with required parameters.

Applies to