diff --git a/IdentityServer/v7/docs/content/tokens/internal.md b/IdentityServer/v7/docs/content/tokens/internal.md index d403218b..c5144dca 100644 --- a/IdentityServer/v7/docs/content/tokens/internal.md +++ b/IdentityServer/v7/docs/content/tokens/internal.md @@ -6,13 +6,15 @@ weight: 60 Sometimes, extensibility code running on your IdentityServer needs access tokens to call other APIs. In this case it is not necessary to use the protocol endpoints. The tokens can be issued internally. -The *IdentityServerTools* class is a collection of useful internal tools that you might need when writing extensibility code +*IIdentityServerTools* is a collection of useful internal tools that you might need when writing extensibility code for IdentityServer. To use it, inject it into your code, e.g. a controller:: - public MyController(IdentityServerTools tools) +```cs + public MyController(IIdentityServerTools tools) { _tools = tools; } +``` The *IssueJwtAsync* method allows creating JWT tokens using the IdentityServer token creation engine. The *IssueClientJwtAsync* is an easier version of that for creating tokens for server-to-server communication (e.g. when you have to call an IdentityServer protected API from your code): @@ -27,4 +29,6 @@ public async Task MyAction() // more code } -``` \ No newline at end of file +``` + +The *IIdentityServerTools* interface was added in v7 to allow mocking. Previous versions refrenced the *IdentityServerTools* implementation class directly. \ No newline at end of file diff --git a/IdentityServer/v7/docs/content/upgrades/v6.3_to_v7.0.md b/IdentityServer/v7/docs/content/upgrades/v6.3_to_v7.0.md index 7c3b1767..338d1617 100644 --- a/IdentityServer/v7/docs/content/upgrades/v6.3_to_v7.0.md +++ b/IdentityServer/v7/docs/content/upgrades/v6.3_to_v7.0.md @@ -56,7 +56,7 @@ The ServerSideSession.Id property has been changed from `int` to `long`. For mos {{% /notice %}} ## Step 3: Breaking changes -TODO +* A new interface *IIdentityServerTools* has been introduced for the *IdentityServerTools* helper class to allow mocking. Update any direct references to *IdentityServerTools* to *IIdentityServerTools*. ## Step 5: Done!