Skip to content

Commit b72fdd6

Browse files
authored
Merge branch 'main' into mb/662
2 parents 820c1aa + d0c22b8 commit b72fdd6

File tree

78 files changed

+1102
-165
lines changed

Some content is hidden

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

78 files changed

+1102
-165
lines changed

astro.config.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import starlightLlmsTxt from "starlight-llms-txt";
1111
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";
1212
import opengraphImages from "astro-opengraph-images";
1313
import { duendeOpenGraphImage } from "./src/components/duende-og-image.js";
14+
import rehypeExternalLinks from "rehype-external-links";
1415
import * as fs from "node:fs";
1516

1617
// https://astro.build/config
@@ -75,7 +76,7 @@ export default defineConfig({
7576
defer: true,
7677
async: true,
7778
},
78-
}
79+
},
7980
],
8081
logo: {
8182
light: "./src/assets/duende-logo.svg",
@@ -191,6 +192,13 @@ export default defineConfig({
191192
},
192193
},
193194
],
195+
[
196+
rehypeExternalLinks,
197+
{
198+
target: "_blank",
199+
rel: ["noopener", "noreferrer"],
200+
},
201+
],
194202
],
195203
},
196204
});

package-lock.json

Lines changed: 16 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"jsdom": "^26.0.0",
3636
"patch-package": "^8.0.0",
3737
"react": "^19.0.0",
38+
"rehype-external-links": "^3.0.0",
3839
"satori": "^0.12.1",
3940
"sharp": "^0.34.1",
4041
"starlight-auto-sidebar": "^0.1.1",

src/content/docs/accesstokenmanagement/advanced/client-credentials.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The most common way to use the access token management for machine to machine co
1212

1313
## Client options
1414

15-
You can add token client definitions to your host while configuring the DI container, e.g.:
15+
You can add token client definitions to your host while configuring the ASP.NET Core service provider, e.g.:
1616

1717
```cs
1818
services.AddClientCredentialsTokenManagement()
@@ -53,7 +53,7 @@ services.Configure<ClientCredentialsClient>("invoices", client =>
5353
});
5454
```
5555

56-
Or use the `IConfigureNamedOptions` if you need access to the DI container during registration, e.g.:
56+
Or use the `IConfigureNamedOptions` if you need access to the ASP.NET Core service provider during registration, e.g.:
5757

5858
```cs
5959
public class ClientCredentialsClientConfigureOptions : IConfigureNamedOptions<ClientCredentialsClient>

src/content/docs/accesstokenmanagement/advanced/user-tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The most common way to use the access token management for interactive web appli
1212

1313
## General options
1414

15-
You can pass in some global options when registering token management in DI.
15+
You can pass in some global options when registering token management in the ASP.NET Core service provider.
1616

1717
* `ChallengeScheme` - by default the OIDC configuration is inferred from the default challenge scheme. This is recommended approach. If for some reason your OIDC handler is not the default challenge scheme, you can set the scheme name on the options
1818
* `UseChallengeSchemeScopedTokens` - the general assumption is that you only have one OIDC handler configured. If that is not the case, token management needs to maintain multiple sets of token artefacts simultaneously. You can opt in to that feature using this setting.

src/content/docs/accesstokenmanagement/blazor-server.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Fortunately, Duende.AccessTokenManagement provides a straightforward solution to
2121

2222
Since the tokens cannot be managed in the authentication session, you need to store them somewhere else. The options include an in-memory data structure, a distributed cache like redis, or a database. Duende.AccessTokenManagement describes this store for tokens with the *IUserTokenStore* interface. In non-blazor scenarios, the default implementation that stores the tokens in the session is used. In your Blazor server application, you'll need to decide where you want to store the tokens and implement the store interface.
2323

24-
The store interface is very simple. `StoreTokenAsync` adds a token to the store for a particular user, `GetTokenAsync` retrieves the user's token, and *ClearTokenAsync* clears the tokens stored for a particular user. A sample implementation that stores the tokens in memory can be found in the *ServerSideTokenStore* in the [*BlazorServer* sample](https://github.com/DuendeSoftware/foss/tree/main/access-token-management/samples/BlazorServer).
24+
The store interface is straightforward. `StoreTokenAsync` adds a token to the store for a particular user, `GetTokenAsync` retrieves the user's token, and *ClearTokenAsync* clears the tokens stored for a particular user. A sample implementation that stores the tokens in memory can be found in the *ServerSideTokenStore* in the [*BlazorServer* sample](https://github.com/DuendeSoftware/foss/tree/main/access-token-management/samples/BlazorServer).
2525

26-
Register your token store in the DI container and tell Duende.AccessTokenManagement to integrate with Blazor by calling `AddBlazorServerAccessTokenManagement<TTokenStore>`:
26+
Register your token store in the ASP.NET Core service provider and tell Duende.AccessTokenManagement to integrate with Blazor by calling `AddBlazorServerAccessTokenManagement<TTokenStore>`:
2727

2828
```cs
2929
builder.Services.AddOpenIdConnectAccessTokenManagement()
@@ -64,7 +64,7 @@ Once registered and initialized, Duende.AccessTokenManagement will keep the stor
6464

6565
## Retrieving And Using Tokens
6666

67-
If you've registered your token store with `AddBlazorServerAccessTokenManagement`, Duende.AccessTokenManagement will register the services necessary to attach tokens to outgoing HTTP requests automatically, using the same API as a non-blazor application. You inject an HTTP client factory and resolve named HTTP clients where ever you need to make HTTP requests, and you register the HTTP client's that use access tokens in the DI system with our extension method:
67+
If you've registered your token store with `AddBlazorServerAccessTokenManagement`, Duende.AccessTokenManagement will register the services necessary to attach tokens to outgoing HTTP requests automatically, using the same API as a non-blazor application. You inject an HTTP client factory and resolve named HTTP clients where ever you need to make HTTP requests, and you register the HTTP client's that use access tokens in the ASP.NET Core service provider with our extension method:
6868

6969
```cs
7070
builder.Services.AddUserAccessTokenHttpClient("demoApiClient", configureClient: client =>

src/content/docs/accesstokenmanagement/web-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public async Task<IActionResult> CallApi()
176176

177177
### HTTP Client Factory
178178

179-
Last but not least, if you registered clients with the factory, you can simply use them. They will try to make sure that a current access token is always sent along. If that is not possible, ultimately a 401 will be returned to the calling code.
179+
Last but not least, if you registered clients with the factory, you can use them. They will try to make sure that a current access token is always sent along. If that is not possible, ultimately a 401 will be returned to the calling code.
180180

181181
```cs
182182
public async Task<IActionResult> CallApi()

src/content/docs/accesstokenmanagement/workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Have a look for the `Worker` project in the [samples folder](https://github.com/
1919

2020
Start by adding a reference to the `Duende.AccessTokenManagement` NuGet package to your application.
2121

22-
You can add the necessary services to the DI system by calling `AddClientCredentialsTokenManagement()`. After that you can add one or more named client definitions by calling `AddClient`.
22+
You can add the necessary services to the ASP.NET Core service provider by calling `AddClientCredentialsTokenManagement()`. After that you can add one or more named client definitions by calling `AddClient`.
2323

2424
```cs
2525
// default cache

src/content/docs/bff/architecture/ui-hosting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ development time. Visual Studio includes SPA templates that start up a SPA and p
4747
Samples of Duende.BFF that take this approach using [React](/bff/samples#reactjs-frontend)
4848
and [Angular](/bff/samples#angular-frontend) are available.
4949

50-
Microsoft's templates are easy-to-use at dev time from Visual Studio. They allow you to simply run the solution, and the
50+
Microsoft's templates are easy-to-use at dev time from Visual Studio. They allow you to run the solution, and the
5151
template proxies requests to the front end for you. At deploy time, that proxy is removed and the static assets of the
5252
site are served by the static file middleware.
5353

src/content/docs/bff/fundamentals/apis/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ sidebar:
55
label: Overview
66
order: 1
77
redirect_from:
8+
- /bff/apis/
89
- /bff/v2/apis/
910
- /bff/v3/fundamentals/apis/
1011
- /identityserver/v5/bff/apis/

0 commit comments

Comments
 (0)