Skip to content

Commit 44fd4db

Browse files
authored
Add link to BlazorServer sample (#633)
1 parent 7e1374e commit 44fd4db

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

FOSS/content/AccessTokenManagement/blazor_server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ This means:
1414
* you cannot use the ASP.NET authentication session to store tokens
1515
* the normal mechanism used to automatically attach tokens to Http Clients making API calls won't work
1616

17-
Fortunately, Duende.AccessTokenManagement provides a straightforward solution to these problems. Also see the *BlazorServer* sample for source code of a full example.
17+
Fortunately, Duende.AccessTokenManagement provides a straightforward solution to these problems. Also see the [*BlazorServer* sample](https://github.com/DuendeSoftware/foss/tree/main/access-token-management/samples/BlazorServer) for source code of a full example.
1818

1919
### Token storage
2020

2121
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.
2222

23-
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.
23+
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).
2424

2525
Register your token store in the DI container and tell Duende.AccessTokenManagement to integrate with Blazor by calling *AddBlazorServerAccessTokenManagement<TTokenStore>*:
2626

FOSS/content/AccessTokenManagement/workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The access tokens need to be requested and cached (either locally or shared betw
1212

1313
The actual business code should not need to be aware of any of this.
1414

15-
Have a look for the `Worker` project in the samples folder for running code.
15+
Have a look for the `Worker` project in the [samples folder](https://github.com/DuendeSoftware/foss/tree/main/access-token-management/samples/) for running code.
1616

1717
### Setup
1818

0 commit comments

Comments
 (0)