File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/content/docs/identityserver/apis/aspnetcore Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ redirect_from:
11
11
- /identityserver/v7/apis/aspnetcore/reference/
12
12
---
13
13
14
- If you are using [ reference tokens] ( /identityserver/tokens/reference ) , you need an authentication handler that
14
+ If you are using [ reference tokens] ( /identityserver/tokens/reference.md ) , you need an authentication handler that
15
15
implements the back-channel validation via the [ OAuth 2.0 token introspection] ( https://tools.ietf.org/html/rfc7662 )
16
- protocol, e.g. [ this ] ( https://github.com/IdentityModel/IdentityModel.AspNetCore.OAuth2Introspection ) one :
16
+ protocol, e.g. [ Duende.AspNetCore.Authentication.OAuth2Introspection ] ( /introspection-auth-handler/index.mdx ) :
17
17
18
- ``` cs
18
+ ``` csharp
19
+ // Program.cs
19
20
builder .Services .AddAuthentication (" token" )
20
21
.AddOAuth2Introspection (" token" , options =>
21
22
{
@@ -32,7 +33,8 @@ builder.Services.AddAuthentication("token")
32
33
It is not uncommon to use the same API with both JWTs and reference tokens. In this case you set up two authentication
33
34
handlers, make one the default handler and provide some forwarding logic, e.g.:
34
35
35
- ``` cs
36
+ ``` csharp
37
+ // Program.cs
36
38
builder .Services .AddAuthentication (" token" )
37
39
38
40
// JWT tokens
@@ -59,7 +61,8 @@ builder.Services.AddAuthentication("token")
59
61
60
62
The logic of the forward selector looks like this:
61
63
62
- ``` cs
64
+ ``` csharp
65
+ // IntrospectionUtilities.cs
63
66
// / <summary>
64
67
// / Provides a forwarding func for JWT vs reference tokens (based on existence of dot in token)
65
68
// / </summary>
You can’t perform that action at this time.
0 commit comments