File tree Expand file tree Collapse file tree
src/content/docs/identityserver/apis/aspnetcore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ redirect_from:
1111 - /identityserver/v7/apis/aspnetcore/reference/
1212---
1313
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
1515implements 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 ) :
1717
18- ``` cs
18+ ``` csharp
19+ // Program.cs
1920builder .Services .AddAuthentication (" token" )
2021 .AddOAuth2Introspection (" token" , options =>
2122 {
@@ -32,7 +33,8 @@ builder.Services.AddAuthentication("token")
3233It is not uncommon to use the same API with both JWTs and reference tokens. In this case you set up two authentication
3334handlers, make one the default handler and provide some forwarding logic, e.g.:
3435
35- ``` cs
36+ ``` csharp
37+ // Program.cs
3638builder .Services .AddAuthentication (" token" )
3739
3840 // JWT tokens
@@ -59,7 +61,8 @@ builder.Services.AddAuthentication("token")
5961
6062The logic of the forward selector looks like this:
6163
62- ``` cs
64+ ``` csharp
65+ // IntrospectionUtilities.cs
6366// / <summary>
6467// / Provides a forwarding func for JWT vs reference tokens (based on existence of dot in token)
6568// / </summary>
You can’t perform that action at this time.
0 commit comments