Skip to content

Commit 538a5ee

Browse files
committed
Update code fences
1 parent e06a88d commit 538a5ee

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

src/content/docs/identitymodel/endpoints/general-usage.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ the client for the token endpoint.
1717
## Request and response objects
1818

1919

20-
All protocol request are modelled as request objects and have a common
21-
base class called *ProtocolRequest* which has properties to set the
20+
All protocol request are modeled as request objects and have a common
21+
base class called `ProtocolRequest` which has properties to set the
2222
endpoint address, client ID, client secret, client assertion, and the
2323
details of how client secrets are transmitted (e.g. authorization header
24-
vs POST body). *ProtocolRequest* derives from *HttpRequestMessage* and
24+
vs POST body). `ProtocolRequest` derives from `HttpRequestMessage` and
2525
thus also allows setting custom headers etc.
2626

2727
The following code snippet creates a request for a client credentials
@@ -36,16 +36,16 @@ var request = new ClientCredentialsTokenRequest
3636
};
3737
```
3838

39-
While in theory you could now call *Prepare* (which internally sets the
39+
While in theory you could now call `Prepare` (which internally sets the
4040
headers, body and address) and send the request via a plain
41-
*HttpClient*, typically there are more parameters with special semantics
41+
`HttpClient`, typically there are more parameters with special semantics
4242
and encoding required. That's why we provide extension methods to do
4343
the low level work.
4444

45-
Equally, a protocol response has a corresponding *ProtocolResponse*
45+
Equally, a protocol response has a corresponding `ProtocolResponse`
4646
implementation that parses the status codes and response content. The
4747
following code snippet would parse the raw HTTP response from a token
48-
endpoint and turn it into a *TokenResponse* object:
48+
endpoint and turn it into a `TokenResponse` object:
4949

5050
```cs
5151
var tokenResponse = await ProtocolResponse
@@ -58,12 +58,12 @@ have a look at an example next.
5858
## Extension methods
5959

6060
For each protocol interaction, an extension method for
61-
*HttpMessageInvoker* (that's the base class of *HttpClient*) exists.
61+
`HttpMessageInvoker` (that's the base class of `HttpClient`) exists.
6262
The extension methods expect a request object and return a response
6363
object.
6464

6565
It is your responsibility to set up and manage the lifetime of the
66-
*HttpClient*, e.g. manually:
66+
`HttpClient`, e.g. manually:
6767

6868
```cs
6969
var client = new HttpClient();
@@ -77,7 +77,7 @@ var response = await client.RequestClientCredentialsTokenAsync(
7777
});
7878
```
7979

80-
You might want to use other techniques to obtain an *HttpClient*, e.g.
80+
You might want to use other techniques to obtain an `HttpClient`, e.g.
8181
via the HTTP client factory:
8282

8383
```cs
@@ -96,7 +96,7 @@ All other endpoint client follow the same design.
9696

9797
:::note
9898
Some client libraries also include a stateful client object (e.g.
99-
*TokenClient* and *IntrospectionClient*). See the corresponding section
99+
`TokenClient` and `IntrospectionClient`). See the corresponding section
100100
to find out more.
101101
:::
102102

@@ -108,9 +108,9 @@ HTTP Basic authentication encoding issues.
108108
:::
109109

110110

111-
Any request type implementing *ProtocolRequest* has the ability to configure
111+
Any request type implementing `ProtocolRequest` has the ability to configure
112112
the client credential style, which specifies how the client will transmit the client ID and secret.
113-
*ClientCredentialStyle* options include *PostBody* and the default value of *AuthorizationHeader*.
113+
`ClientCredentialStyle` options include `PostBody` and the default value of `AuthorizationHeader`.
114114

115115
```cs
116116
var client = HttpClientFactory.CreateClient("my_named_token_client");
@@ -131,7 +131,7 @@ specification version you are targeting. When using IdentityServer, both header
131131
are supported and _"it just works"_.
132132

133133
[RFC 6749](https://datatracker.ietf.org/doc/rfc6749/), the original OAuth spec, says that support for the basic auth header is mandatory,
134-
and that the POST body is optional. OAuth 2.1 reverses this - now the body is mandatory and the header is optional.
134+
and that the POST body is optional. OAuth 2.1 reverses this: now the body is mandatory and the header is optional.
135135

136136
In the previous OAuth specification version, the header caused bugs and interoperability problems. To follow
137137
both RFC 6749 and RFC 2617 (which is where basic auth headers are specified), you have to form url encode the client id and client secret,
@@ -145,22 +145,22 @@ References:
145145
- [RFC 2617 section 2](https://www.rfc-editor.org/rfc/rfc2617#section-2)
146146
- [OAuth 2.1 Draft](https://datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/)
147147

148-
Here is a complete list of *ProtocolRequest* implementors that expose the *ClientCredentialStyle* option:
149-
150-
- *Duende.IdentityModel.Client.AuthorizationCodeTokenRequest*
151-
- *Duende.IdentityModel.Client.BackchannelAuthenticationRequest*
152-
- *Duende.IdentityModel.Client.BackchannelAuthenticationTokenRequest*
153-
- *Duende.IdentityModel.Client.ClientCredentialsTokenRequest*
154-
- *Duende.IdentityModel.Client.DeviceAuthorizationRequest*
155-
- *Duende.IdentityModel.Client.DeviceTokenRequest*
156-
- *Duende.IdentityModel.Client.DiscoveryDocumentRequest*
157-
- *Duende.IdentityModel.Client.DynamicClientRegistrationRequest*
158-
- *Duende.IdentityModel.Client.JsonWebKeySetRequest*
159-
- *Duende.IdentityModel.Client.PasswordTokenRequest*
160-
- *Duende.IdentityModel.Client.PushedAuthorizationRequest*
161-
- *Duende.IdentityModel.Client.RefreshTokenRequest*
162-
- *Duende.IdentityModel.Client.TokenExchangeTokenRequest*
163-
- *Duende.IdentityModel.Client.TokenIntrospectionRequest*
164-
- *Duende.IdentityModel.Client.TokenRequest*
165-
- *Duende.IdentityModel.Client.TokenRevocationRequest*
166-
- *Duende.IdentityModel.Client.UserInfoRequest*
148+
Here is a complete list of `ProtocolRequest` implementors that expose the `ClientCredentialStyle` option:
149+
150+
- `Duende.IdentityModel.Client.AuthorizationCodeTokenRequest`
151+
- `Duende.IdentityModel.Client.BackchannelAuthenticationRequest`
152+
- `Duende.IdentityModel.Client.BackchannelAuthenticationTokenRequest`
153+
- `Duende.IdentityModel.Client.ClientCredentialsTokenRequest`
154+
- `Duende.IdentityModel.Client.DeviceAuthorizationRequest`
155+
- `Duende.IdentityModel.Client.DeviceTokenRequest`
156+
- `Duende.IdentityModel.Client.DiscoveryDocumentRequest`
157+
- `Duende.IdentityModel.Client.DynamicClientRegistrationRequest`
158+
- `Duende.IdentityModel.Client.JsonWebKeySetRequest`
159+
- `Duende.IdentityModel.Client.PasswordTokenRequest`
160+
- `Duende.IdentityModel.Client.PushedAuthorizationRequest`
161+
- `Duende.IdentityModel.Client.RefreshTokenRequest`
162+
- `Duende.IdentityModel.Client.TokenExchangeTokenRequest`
163+
- `Duende.IdentityModel.Client.TokenIntrospectionRequest`
164+
- `Duende.IdentityModel.Client.TokenRequest`
165+
- `Duende.IdentityModel.Client.TokenRevocationRequest`
166+
- `Duende.IdentityModel.Client.UserInfoRequest`

src/content/docs/identitymodel/utils/constants.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ OpenID Connect protocol values.
562562

563563
## JWT Claim Types
564564

565-
The *JwtClaimTypes* class has all standard claim types found in the
565+
The `JwtClaimTypes` class has all standard claim types found in the
566566
OpenID Connect, JWT and OAuth 2.0 specs -many of them are also
567567
aggregated at [IANA](https://www.iana.org/assignments/jwt/jwt.xhtml).
568568

0 commit comments

Comments
 (0)