Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for IIdentityServerTools #373

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions IdentityServer/v7/docs/content/tokens/internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -27,4 +29,6 @@ public async Task<IActionResult> MyAction()

// more code
}
```
```

The *IIdentityServerTools* interface was added in v7 to allow mocking. Previous versions refrenced the *IdentityServerTools* implementation class directly.
2 changes: 1 addition & 1 deletion IdentityServer/v7/docs/content/upgrades/v6.3_to_v7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
Loading