Skip to content

Commit fa887a7

Browse files
committed
Fix typos and formatting in API resources documentation; add section on resource isolation
1 parent 52eb8e2 commit fa887a7

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/content/docs/identityserver/fundamentals/resources/api-resources.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from:
1010
- /identityserver/v7/fundamentals/resources/api_resources/
1111
---
1212

13-
When the API/resource surface gets larger, a flat list of scopes might become hard to manage.
13+
When the API/resource surface gets larger, a flat list of scopes might become hard to manage.
1414

1515
In Duende IdentityServer, the `ApiResource` class allows for some additional organization and grouping and isolation of scopes and providing some common settings.
1616

@@ -40,14 +40,14 @@ With `ApiResource` you can now create two logical APIs and their corresponding s
4040

4141
```cs
4242
public static readonly IEnumerable<ApiResource> GetApiResources()
43-
{
43+
{
4444
return new List<ApiResource>
4545
{
4646
new ApiResource("invoice", "Invoice API")
4747
{
4848
Scopes = { "invoice.read", "invoice.pay", "manage", "enumerate" }
4949
},
50-
50+
5151
new ApiResource("customer", "Customer API")
5252
{
5353
Scopes = { "customer.read", "customer.contact", "manage", "enumerate" }
@@ -111,13 +111,14 @@ Client requests: *`manage`*:
111111
```
112112

113113
### Adding User Claims
114-
You can specify that an access token for an API resource (regardless of which scope is requested) should contain additional user claims.
114+
115+
You can specify that an access token for an API resource (regardless of which scope is requested) should contain additional user claims.
115116

116117
```cs
117118
var customerResource = new ApiResource("customer", "Customer API")
118119
{
119120
Scopes = { "customer.read", "customer.contact", "manage", "enumerate" },
120-
121+
121122
// additional claims to put into access token
122123
UserClaims =
123124
{
@@ -164,3 +165,7 @@ var invoiceApi = new ApiResource("invoice", "Invoice API")
164165
:::note
165166
Make sure that you have configured your IdentityServer for the required signing algorithm. See [here](/identityserver/fundamentals/key-management.md) for more details.
166167
:::
168+
169+
### Resource Isolation
170+
171+
See [Resource Isolation](/identityserver/fundamentals/resources/isolation.md) for more details on how to use the `resource` parameter to request a token with scopes for a specific resource.

0 commit comments

Comments
 (0)