You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/tokens/requesting.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Pragma: no-cache
50
50
```
51
51
52
52
### .NET Client Library
53
-
In .NET you can leverage the [IdentityModel](https://identitymodel.readthedocs.io/en/latest/) client library to [request](https://identitymodel.readthedocs.io/en/latest/client/token.html) tokens.
53
+
In .NET you can use the [Duende IdentityModel](../../../identitymodel) client library to [request](../../../identitymodel/endpoints/token) tokens.
54
54
55
55
The above token request would look like this in C#:
56
56
@@ -72,36 +72,37 @@ var response = await client.RequestClientCredentialsTokenAsync(new ClientCredent
72
72
### Automating Token Requests In ASP.NET Core And Worker Applications
73
73
74
74
The [Duende.AccessTokenManagement](https://github.com/DuendeSoftware/Duende.AccessTokenManagement/wiki) library can automate client credential request and token lifetime management for you.
75
+
Using this library, you can enable access token management for an HTTP client provided by `IHttpClientFactory`.
75
76
76
-
Using this library, you only need to register the token client in DI:
77
+
You can add the necessary services to ASP.NET Core's service provider by calling `AddClientCredentialsTokenManagement()`. One or more named client definitions need to be registered by calling `AddClient()`.
You can then add token management to an HTTP-factory provided client:
92
+
You can then register named HTTP clients with `IHttpClientFactory`. These named clients will automatically use the above client definitions to request and use access tokens.
0 commit comments