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/reference/endpoints/introspection.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,20 @@ The introspection endpoint is an implementation of [RFC 7662](https://tools.ietf
16
16
It can be used to validate reference tokens, JWTs (if the consumer does not have support for appropriate JWT or
17
17
cryptographic libraries) and refresh tokens. Refresh tokens can only be introspected by the client that requested them.
18
18
19
-
The introspection endpoint requires authentication - since the client of an introspection endpoint is an API, you
20
-
configure the secret on the `ApiResource`.
19
+
The introspection endpoint requires authentication. Since the request to the introspection endpoint is typically done by an API, which is not an OAuth client, the [`ApiResource`](/identityserver/fundamentals/resources/api-resources) is used to configure credentials:
20
+
21
+
```csharp
22
+
newApiResource("resource1")
23
+
{
24
+
Scopes= { "scope1", "scope2" }, // Replace "scope1", "scope2" with the actual scopes required for your API
25
+
26
+
ApiSecrets=
27
+
{
28
+
newSecret("secret".Sha256())
29
+
}
30
+
}
31
+
```
32
+
Here the id used for authentication is the name of the `ApiResource`: "resource1" and the secret the configured secret. The introspection endpoint uses HTTP basic auth to communicate these credentials:
21
33
22
34
```text
23
35
POST /connect/introspect
@@ -26,8 +38,7 @@ Authorization: Basic xxxyyy
26
38
token=<token>
27
39
```
28
40
29
-
A successful response will return a status code of 200, the token claims, the token type and a flag indicating the token
30
-
is active:
41
+
A successful response will return a status code of 200, the token claims, the token type, and a flag indicating the token is active:
0 commit comments