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/identitymodel/endpoints/introspection.mdx
+49-19Lines changed: 49 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,6 @@ description: Learn how to use the OAuth 2.0 token introspection endpoint to vali
4
4
sidebar:
5
5
order: 4
6
6
label: Token Introspection
7
-
badge:
8
-
text: v7.1
9
-
variant: tip
10
7
redirect_from:
11
8
- /foss/identitymodel/endpoints/introspection/
12
9
---
@@ -31,16 +28,10 @@ The following code sends a reference token to an introspection endpoint:
31
28
Address = Endpoint,
32
29
ClientId = "client",
33
30
ClientSecret = "secret",
34
-
ResponseFormat = ResponseFormat.Json,
35
-
36
-
// Optional
37
-
// JwtResponseValidator = new CustomIntrospectionJwtResponseValidator()
31
+
ResponseFormat = ResponseFormat.Json
38
32
};
39
33
40
-
var httpClient = new HttpClient()
41
-
{
42
-
BaseAddress = new Uri(Endpoint)
43
-
};
34
+
var httpClient = new HttpClient();
44
35
45
36
var introspectionClient = new IntrospectionClient(httpClient, clientOptions);
46
37
var introspectionResponse = await introspectionClient.Introspect("token");`}
@@ -54,10 +45,7 @@ var introspectionResponse = await client.IntrospectTokenAsync(new TokenIntrospec
54
45
{
55
46
Address = Endpoint,
56
47
Token = "token",
57
-
ResponseFormat = ResponseFormat.Jwt,
58
-
59
-
// Optional
60
-
JwtResponseValidator = new CustomIntrospectionJwtResponseValidator()
48
+
ResponseFormat = ResponseFormat.Json
61
49
});`}
62
50
/>
63
51
</TabItem>
@@ -93,12 +81,39 @@ In addition, it provides access to the following standard response parameters:
93
81
|`Issuer`| The string representing the issuer of the token or `null` if the `iss` claim is missing. |
94
82
|`JwtId`| The string identifier for the token or `null` if the `jti` claim is missing. |
95
83
96
-
## JWT Response Validation :badge[v7.1]
84
+
## JWT Response Format :badge[v7.1]
85
+
86
+
Introspection requests can optionally pass a parameter to indicate that a signed JWT rather than JSON payload is desired.
87
+
Such a JWT response is most often useful for non-repudiation. For example, an API might rely on the claims from introspection
88
+
to produce digitally signed documents or issue certificates, with the Authorization Server assuming legal liability for
89
+
the introspected data. A JWT introspection response can be stored and its signature independently verified as part of an audit.
97
90
98
-
Most applications will not benefit from additional checks at runtime. By default, no validation is performed on the
99
-
incoming JWT response, it is only checked for valid JWT formatting.
91
+
### Requesting JWT Response Format
100
92
101
-
An extensibility point is available to provide your own implementation of `ITokenIntrospectionJwtResponseValidator` using the `TokenIntrospectionRequest.JwtResponseValidator` property or using `IntrospectionClientOptions`.
93
+
To request the JWT response format, set the `ResponseFormat` option to `ResponseFormat.Jwt`.
0 commit comments