Skip to content

Commit 964759c

Browse files
khalidabuhakmehmaartenba
authored andcommitted
Created distinct /reference/vX folders and ported API changes from the future release.
1 parent e40a104 commit 964759c

195 files changed

Lines changed: 6564 additions & 400 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

astro/astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default defineConfig({
117117
errorOnFallbackPages: false,
118118
errorOnInconsistentLocale: true,
119119
errorOnRelativeLinks: false,
120-
errorOnLocalLinks: false,
120+
errorOnLocalLinks: false
121121
}),
122122
],
123123
title: "Duende Software Docs",

astro/src/content/docs/bff/fundamentals/session/management/back-channel-logout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ involving the user's browser. This design avoids problems with 3rd party cookies
2323

2424
The back-channel logout endpoint is invoked by the remote identity provider when it determines that sessions should be
2525
ended. IdentityServer will send back-channel logout requests if
26-
you [configure](/identityserver/reference/models/client.md#authentication--session-management) your client's
26+
you [configure](/identityserver/reference/v8/models/client.md#authentication--session-management) your client's
2727
`BackChannelLogoutUri`. When a session ends at IdentityServer, any client that was participating in that session that
2828
has a back-channel logout URI configured will be sent a back-channel logout request. This typically happens when another
2929
application signs out. [Expiration](/identityserver/ui/server-side-sessions/session-expiration.mdx)

astro/src/content/docs/bff/fundamentals/session/management/user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ handler's [ClaimAction](https://docs.microsoft.com/en-us/dotnet/API/microsoft.as
6666
infrastructure, or by
6767
using [claims transformation](https://docs.microsoft.com/en-us/dotnet/API/microsoft.aspnetcore.authentication.iclaimstransformation?view=aspnetcore-7.0).
6868
For example, if you add a [claim](/identityserver/fundamentals/claims.md) to
69-
the [userinfo endpoint](/identityserver/reference/endpoints/userinfo.md) at IdentityServer that you would like to include
69+
the [userinfo endpoint](/identityserver/reference/v8/endpoints/userinfo.md) at IdentityServer that you would like to include
7070
in the */bff/user* endpoint, you need to add a corresponding ClaimAction in the BFF's OpenID Connect Handler to include
7171
the claim in the BFF's session.
7272

astro/src/content/docs/identityserver/apis/aspnetcore/authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ app.MapGet("/", () =>
7171

7272
Historically, Duende IdentityServer emitted the `scope` claims as an array in the JWT. This works very well with the .NET deserialization logic, which turns every array item into a separate claim of type `scope`.
7373

74-
The newer *JWT Profile for OAuth* [spec](/identityserver/overview/specs.md) mandates that the scope claim is a single space delimited string. You can switch the format by setting the `EmitScopesAsSpaceDelimitedStringInJwt` on the [options](/identityserver/reference/options.md). But this means that the code consuming access tokens might need to be adjusted. The following code can do a conversion to the *multiple claims* format that .NET prefers:
74+
The newer *JWT Profile for OAuth* [spec](/identityserver/overview/specs.md) mandates that the scope claim is a single space delimited string. You can switch the format by setting the `EmitScopesAsSpaceDelimitedStringInJwt` on the [options](/identityserver/reference/v8/options.md). But this means that the code consuming access tokens might need to be adjusted. The following code can do a conversion to the *multiple claims* format that .NET prefers:
7575

7676
```csharp
7777
namespace IdentityModel.AspNetCore.AccessTokenValidation;

astro/src/content/docs/identityserver/aspnet-identity/schemes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ IdentityServer always uses the `"idsrv.external"` scheme here, available in the
6060
### Check Session Cookie
6161

6262
IdentityServer session management requires a separate cookie to monitor the session state without sending the large authentication cookie.
63-
The [User Session Service](/identityserver/reference/services/user-session-service.md) manages this cookie.
63+
The [User Session Service](/identityserver/reference/v8/services/user-session-service.md) manages this cookie.
6464

6565
- **Default Name:** `"idsrv.session"` (Constant: `IdentityServerConstants.DefaultCheckSessionCookieName`).
6666

astro/src/content/docs/identityserver/configuration/dcr.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ create a new ASP.NET Core Web application which will host the Configuration API.
109109
needs an implementation of this interface.
110110

111111
You can either use the Entity Framework Core-based implementation, or implement
112-
the interface yourself. See [the IClientConfigurationStore reference](/identityserver/reference/stores/index.md)
112+
the interface yourself. See [the IClientConfigurationStore reference](/identityserver/reference/v8/stores/index.md)
113113
for more details. If you wish to use the built-in implementation, install its NuGet
114114
package and add it to the ASP.NET Core service provider.
115115

@@ -163,7 +163,7 @@ and configure the store implementation.
163163
needs an implementation of this interface.
164164

165165
You can either use the Entity Framework Core-based implementation, or implement
166-
the interface yourself. See [the IClientConfigurationStore reference](/identityserver/reference/stores/index.md)
166+
the interface yourself. See [the IClientConfigurationStore reference](/identityserver/reference/v8/stores/index.md)
167167
for more details. If you wish to use the built-in implementation, install its NuGet
168168
package and add it to the ASP.NET Core service provider.
169169

@@ -192,7 +192,7 @@ and configure the store implementation.
192192

193193
### Adding the Registration Endpoint to the Discovery Document
194194

195-
By default, the Dynamic Client Registration (DCR) endpoint is not included in the [discovery document](/identityserver/reference/endpoints/discovery.md) of Duende IdentityServer.
195+
By default, the Dynamic Client Registration (DCR) endpoint is not included in the [discovery document](/identityserver/reference/v8/endpoints/discovery.md) of Duende IdentityServer.
196196

197197
To include it, change the Discovery Document options when registering IdentityServer in the service collection:
198198

@@ -263,7 +263,7 @@ authentication scheme and an authorization policy that requires a particular
263263
scope to be present in the JWTs. You could choose any name for the scope that
264264
gives access to the Configuration APIs. Let's use the name
265265
`IdentityServer.Configuration` for this example. You would then define the
266-
`IdentityServer.Configuration` scope as an [ApiScope](/identityserver/reference/models/api-scope.md) in your
266+
`IdentityServer.Configuration` scope as an [ApiScope](/identityserver/reference/v8/models/api-scope.md) in your
267267
IdentityServer and allow the appropriate clients to access it.
268268

269269
An automated process running in a CI pipeline could be configured as an OAuth client
@@ -301,7 +301,7 @@ The registration endpoint is invoked by making an HTTP POST request to the `/con
301301
with a JSON payload containing metadata describing the desired client as described in [RFC 7591](https://datatracker.ietf.org/doc/rfc7591/)
302302
and [OpenID Connect Dynamic Client Registration 1.0](https://openid.net/specs/openid-connect-registration-1_0.html).
303303

304-
The supported metadata properties are listed in the reference section on the [`DynamicClientRegistrationRequest` model](/identityserver/reference/dcr/models.md#dynamicclientregistrationrequest).
304+
The supported metadata properties are listed in the reference section on the [`DynamicClientRegistrationRequest` model](/identityserver/reference/v8/dcr/models.md#dynamicclientregistrationrequest).
305305
A mixture of standardized and IdentityServer-specific properties are supported. Most standardized properties that
306306
are applicable to the client credentials or code flow grants are supported.
307307

@@ -346,19 +346,19 @@ the original request, the claims principal that made the request, and a dictiona
346346
pass state between customized steps. Each step should update the client in the context and return an `IStepResult` to
347347
indicate success or failure.
348348

349-
For more details, see the [reference section on DCR validation](/identityserver/reference/dcr/validation.md).
349+
For more details, see the [reference section on DCR validation](/identityserver/reference/v8/dcr/validation.md).
350350

351351
### Processing
352352

353353
The request processor can be customized by implementing the `IDynamicClientRegistrationRequestProcessor` interface,
354354
or by extending the default `DynamicClientRegistrationRequestProcessor`. The default request processor contains virtual
355355
methods that allow you to override (part of) its functionality.
356356

357-
For more details, see the [reference section on DCR request processing](/identityserver/reference/dcr/processing.md).
357+
For more details, see the [reference section on DCR request processing](/identityserver/reference/v8/dcr/processing.md).
358358

359359
### Response Generation
360360

361361
To customize the HTTP responses of the Configuration API, you can implement the `IDynamicClientRegistrationResponseGenerator`
362362
interface, or extend the default `DynamicClientRegistrationResponseGenerator`.
363363

364-
For more details, see the [reference section on DCR response generation](/identityserver/reference/dcr/response.md).
364+
For more details, see the [reference section on DCR response generation](/identityserver/reference/v8/dcr/response.md).

astro/src/content/docs/identityserver/data/configuration.md renamed to astro/src/content/docs/identityserver/data/configuration.mdx

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ and [Resources](/identityserver/fundamentals/resources).
1818
Store interfaces are designed to abstract accessing the configuration data.
1919
The stores used in Duende IdentityServer are:
2020

21-
* [Client store](/identityserver/reference/stores/client-store.md) for `Client` data.
22-
* [CORS policy service](/identityserver/reference/stores/cors-policy-service.md)
21+
* [Client store](/identityserver/reference/v8/stores/client-store.md) for `Client` data.
22+
* [CORS policy service](/identityserver/reference/v8/stores/cors-policy-service.md)
2323
for [CORS support](/identityserver/tokens/cors.md). Given that this is so closely tied to the `Client` configuration
2424
data, the CORS policy service is considered one of the configuration stores.
25-
* [Resource store](/identityserver/reference/stores/resource-store.md) for `IdentityResource`, `ApiResource`, and
25+
* [Resource store](/identityserver/reference/v8/stores/resource-store.md) for `IdentityResource`, `ApiResource`, and
2626
`ApiScope` data.
27-
* [Identity Provider store](/identityserver/reference/stores/idp-store.md) for `IdentityProvider` data.
27+
* [Identity Provider store](/identityserver/reference/v8/stores/idp-store.md) for `IdentityProvider` data.
2828

2929
## Registering Custom Stores
3030

3131
Custom implementations of the stores must be registered in the ASP.NET Core service provider.
32-
There are [convenience methods](/identityserver/reference/di.md#configuration-stores) for registering these.
32+
There are [convenience methods](/identityserver/reference/v8/di.md#configuration-stores) for registering these.
3333
For example:
3434

3535
```csharp
@@ -38,7 +38,7 @@ builder.Services.AddIdentityServer()
3838
.AddClientStore<YourCustomClientStore>()
3939
.AddCorsPolicyService<YourCustomCorsPolicyService>()
4040
.AddResourceStore<YourCustomResourceStore>()
41-
.AddIdentityProviderStore<YourCustomAddIdentityProviderStore>();
41+
.AddIdentityProviderStore<YourCustomIdentityProviderStore>();
4242
```
4343

4444
## Caching Configuration Data
@@ -47,7 +47,65 @@ Configuration data is used frequently during request processing.
4747
If this data is loaded from a database or other external store, then it might be expensive to frequently re-load the
4848
same data.
4949

50-
Duende IdentityServer provides [convenience methods](/identityserver/reference/di.md#caching-configuration-data) to
50+
import { Tabs, TabItem } from '@astrojs/starlight/components';
51+
52+
<Tabs syncKey="isVersion">
53+
<TabItem label="v8.0+">
54+
55+
Duende IdentityServer provides [convenience methods](/identityserver/reference/v8/di#caching-configuration-data) to
56+
enable caching data from the various stores.
57+
The caching implementation is built on Microsoft's [`HybridCache`](https://learn.microsoft.com/en-us/aspnet/core/performance/caching/hybrid) from the `Microsoft.Extensions.Caching.Hybrid` package, registered as a [keyed service](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#keyed-services) under `ServiceProviderKeys.ConfigurationStoreCache`. For example:
58+
59+
```csharp
60+
// Program.cs
61+
builder.Services.AddIdentityServer()
62+
.AddClientStore<YourCustomClientStore>()
63+
.AddCorsPolicyService<YourCustomCorsPolicyService>()
64+
.AddResourceStore<YourCustomResourceStore>()
65+
.AddInMemoryCaching()
66+
.AddClientStoreCache<YourCustomClientStore>()
67+
.AddCorsPolicyCache<YourCustomCorsPolicyService>()
68+
.AddResourceStoreCache<YourCustomResourceStore>()
69+
.AddIdentityProviderStoreCache<YourCustomIdentityProviderStore>();
70+
```
71+
72+
For Entity Framework users, there is a convenience method `AddConfigurationStoreCache()` that enables caching for all configuration stores at once:
73+
74+
```csharp
75+
// Program.cs
76+
builder.Services.AddIdentityServer()
77+
.AddConfigurationStore(...)
78+
.AddConfigurationStoreCache();
79+
```
80+
81+
The duration of the data in the default cache is configurable on
82+
the [`IdentityServerOptions`](/identityserver/reference/v8/options#caching).
83+
For example:
84+
85+
```csharp
86+
// Program.cs
87+
builder.Services.AddIdentityServer(options => {
88+
options.Caching.ClientStoreExpiration = TimeSpan.FromMinutes(5);
89+
options.Caching.ResourceStoreExpiration = TimeSpan.FromMinutes(5);
90+
})
91+
.AddClientStore<YourCustomClientStore>()
92+
.AddCorsPolicyService<YourCustomCorsPolicyService>()
93+
.AddResourceStore<YourCustomResourceStore>()
94+
.AddInMemoryCaching()
95+
.AddClientStoreCache<YourCustomClientStore>()
96+
.AddCorsPolicyCache<YourCustomCorsPolicyService>()
97+
.AddResourceStoreCache<YourCustomResourceStore>();
98+
```
99+
100+
Further customization of the cache is possible:
101+
102+
* The caching stores use a keyed `HybridCache` instance registered under `ServiceProviderKeys.ConfigurationStoreCache`. You can customize the `HybridCache` behavior by configuring the keyed service registration (e.g., adding a distributed cache backend via `IDistributedCache`).
103+
* By default, only the L1 (in-memory) cache tier is used. To enable L2 (distributed) caching, register an `IDistributedCache` implementation (e.g., Redis via `AddStackExchangeRedisCache`). `HybridCache` will automatically use it as the L2 tier.
104+
105+
</TabItem>
106+
<TabItem label="v7.0">
107+
108+
Duende IdentityServer provides [convenience methods](/identityserver/reference/v8/di.md#caching-configuration-data) to
51109
enable caching data from the various stores.
52110
The caching implementation relies upon an `ICache<T>` service and must also be added to the ASP.NET Core service provider.
53111
For example:
@@ -62,11 +120,11 @@ builder.Services.AddIdentityServer()
62120
.AddClientStoreCache<YourCustomClientStore>()
63121
.AddCorsPolicyCache<YourCustomCorsPolicyService>()
64122
.AddResourceStoreCache<YourCustomResourceStore>()
65-
.AddIdentityProviderStoreCache<YourCustomAddIdentityProviderStore>();
123+
.AddIdentityProviderStoreCache<YourCustomIdentityProviderStore>();
66124
```
67125

68126
The duration of the data in the default cache is configurable on
69-
the [IdentityServerOptions](/identityserver/reference/options.md#caching).
127+
the [`IdentityServerOptions`](/identityserver/reference/v8/options#caching).
70128
For example:
71129

72130
```csharp
@@ -93,9 +151,12 @@ Further customization of the cache is possible:
93151
If you wish to customize the in-memory caching behavior, you can replace the `IMemoryCache` implementation in the
94152
dependency injection system.
95153

154+
</TabItem>
155+
</Tabs>
156+
96157
## In-Memory Stores
97158

98-
The various [in-memory configuration APIs](/identityserver/reference/di.md#configuration-stores) allow for configuring
159+
The various [in-memory configuration APIs](/identityserver/reference/v8/di.md#configuration-stores) allow for configuring
99160
IdentityServer from an in-memory list of the various configuration objects.
100161
These in-memory collections can be hard-coded in the hosting application, or could be loaded dynamically from a
101162
configuration file or a database.

astro/src/content/docs/identityserver/data/ef.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ This options class contains properties to control the operational store and `Per
142142

143143

144144
:::note
145-
The token cleanup feature does `not` remove persisted grants that are `consumed` (see [persisted grants](/identityserver/reference/stores/persisted-grant-store.md)). It only removes persisted grants that are beyond their `Expiration`.
145+
The token cleanup feature does `not` remove persisted grants that are `consumed` (see [persisted grants](/identityserver/reference/v8/stores/persisted-grant-store.md)). It only removes persisted grants that are beyond their `Expiration`.
146146
:::
147147

148148
## Database Creation And Schema Changes Across Different IdentityServer Versions

0 commit comments

Comments
 (0)