@@ -11,15 +11,15 @@ redirect_from:
1111The client library for the token endpoint ([ OAuth
12122.0] ( https://tools.ietf.org/html/rfc6749#section-3.2 ) and [ OpenID
1313Connect] ( https://openid.net/specs/openid-connect-core-1_0.html#tokenendpoint ) )
14- is provided as a set of extension methods for * HttpClient* . This allows
15- creating and managing the lifetime of the * HttpClient* the way you
16- prefer - e.g. statically or via a factory like the Microsoft
17- * HttpClientFactory* .
14+ is provided as a set of extension methods for ` HttpClient ` . This allows
15+ creating and managing the lifetime of the ` HttpClient ` the way you
16+ prefer: statically or via a factory like the Microsoft
17+ ` HttpClientFactory ` .
1818
1919Requesting a token
2020------------------
2121
22- The main extension method is called * RequestTokenAsync* - it has direct
22+ The main extension method is called ` RequestTokenAsync ` . It has direct
2323support for standard parameters like client ID/secret (or assertion) and
2424grant type, but it also allows setting arbitrary other parameters via a
2525dictionary. All other extensions methods ultimately call this method
@@ -44,12 +44,12 @@ var response = await client.RequestTokenAsync(new TokenRequest
4444});
4545```
4646
47- The response is of type * TokenResponse* and has properties for the
48- standard token response parameters like * access_token* , * expires_in*
47+ The response is of type ` TokenResponse ` and has properties for the
48+ standard token response parameters like ` access_token ` , ` expires_in `
4949etc. You also have access to the raw response and to a parsed
50- JSON document (via the * Raw* and * Json* properties).
50+ JSON document (via the ` Raw ` and ` Json ` properties).
5151
52- Before using the response, you should always check the * IsError*
52+ Before using the response, you should always check the ` IsError `
5353property to make sure the request was successful:
5454
5555``` csharp
@@ -59,11 +59,11 @@ var token = response.AccessToken;
5959var custom = response .Json .TryGetString (" custom_parameter" );
6060```
6161
62- Requesting a token using the * client_credentials* Grant Type
62+ Requesting a token using the ` client_credentials ` Grant Type
6363------------------------------------------------------------
6464
65- The * RequestClientCredentialsToken* extension method has convenience
66- properties for the * client_credentials* grant type:
65+ The ` RequestClientCredentialsToken ` extension method has convenience
66+ properties for the ` client_credentials ` grant type:
6767
6868``` csharp
6969var response = await client .RequestClientCredentialsTokenAsync (new ClientCredentialsTokenRequest
@@ -76,11 +76,11 @@ var response = await client.RequestClientCredentialsTokenAsync(new ClientCredent
7676});
7777```
7878
79- Requesting a token using the * password* Grant Type
79+ Requesting a token using the ` password ` Grant Type
8080--------------------------------------------------
8181
82- The * RequestPasswordToken* extension method has convenience properties
83- for the * password* grant type:
82+ The ` RequestPasswordToken ` extension method has convenience properties
83+ for the ` password ` grant type:
8484
8585``` csharp
8686var response = await client .RequestPasswordTokenAsync (new PasswordTokenRequest
@@ -96,11 +96,11 @@ var response = await client.RequestPasswordTokenAsync(new PasswordTokenRequest
9696});
9797```
9898
99- Requesting a token using the * authorization_code* Grant Type
99+ Requesting a token using the ` authorization_code ` Grant Type
100100------------------------------------------------------------
101101
102- The * RequestAuthorizationCodeToken* extension method has convenience
103- properties for the * authorization_code* grant type and PKCE:
102+ The ` RequestAuthorizationCodeToken ` extension method has convenience
103+ properties for the ` authorization_code ` grant type and PKCE:
104104
105105``` csharp
106106var response = await client .RequestAuthorizationCodeTokenAsync (new AuthorizationCodeTokenRequest
@@ -118,11 +118,11 @@ var response = await client.RequestAuthorizationCodeTokenAsync(new Authorization
118118});
119119```
120120
121- Requesting a token using the * refresh_token* Grant Type
121+ Requesting a token using the ` refresh_token ` Grant Type
122122-------------------------------------------------------
123123
124- The * RequestRefreshToken* extension method has convenience properties
125- for the * refresh_token* grant type:
124+ The ` RequestRefreshToken ` extension method has convenience properties
125+ for the ` refresh_token ` grant type:
126126
127127``` csharp
128128var response = await _client .RequestRefreshTokenAsync (new RefreshTokenRequest
@@ -139,8 +139,8 @@ var response = await _client.RequestRefreshTokenAsync(new RefreshTokenRequest
139139Requesting a Device Token
140140-------------------------
141141
142- The * RequestDeviceToken* extension method has convenience properties for
143- the * urn:ietf:params:oauth:grant-type: device_code * grant type:
142+ The ` RequestDeviceToken ` extension method has convenience properties for
143+ the ` urn:ietf:params:oauth:grant-type:device_code ` grant type:
144144
145145``` csharp
146146var response = await client .RequestDeviceTokenAsync (new DeviceTokenRequest
0 commit comments