1
1
---
2
- title : Duende IdentityModel OAuth 2.0 Token Introspection
2
+ title : Duende Introspection Authentication Handler
3
3
description : An ASP.NET Core authentication handler for OAuth 2.0 token introspection.
4
4
sidebar :
5
5
label : Overview
8
8
9
9
import { CardGrid , LinkCard } from " @astrojs/starlight/components" ;
10
10
11
- The ` Duende.IdentityModel. AspNetCore.OAuth2Introspection ` library implements an ASP.NET Core authentication handler for
11
+ The ` Duende.AspNetCore.Authentication .OAuth2Introspection ` library implements an ASP.NET Core authentication handler for
12
12
OAuth 2.0 token introspection, as defined in [ RFC 7662] ( https://datatracker.ietf.org/doc/html/rfc7662 ) , "OAuth 2.0 Token Introspection".
13
13
14
14
## Use Case
@@ -19,38 +19,39 @@ your application, where the token itself does not carry any information about th
19
19
relies on the authorization server to provide this information.
20
20
21
21
:::tip
22
- You can also use this library to introspect JWT tokens, by disabling ` SkipTokensWithDots ` in the ` OAuth2IntrospectionOptions ` .
23
- This is disabled by default .
22
+ By default, you can also use this library to introspect JWT tokens.
23
+ You can disable this behavior by setting ` SkipTokensWithDots = true ` in the [ ` OAuth2IntrospectionOptions ` ] ( /introspection-auth-handler/options.mdx ) .
24
24
:::
25
25
26
26
## Features
27
27
28
28
- Implements the OAuth 2.0 token introspection protocol.
29
29
- Supports both opaque and JWT access token introspection.
30
- - TODO: does it support introspection of refresh tokens?
31
30
- Supports caching of introspection results to reduce load on the authorization server.
32
31
- Provides a customizable authentication handler for ASP.NET Core.
33
32
- Integrates seamlessly with ASP.NET Core's authentication middleware.
34
33
35
34
## Installation
36
35
37
- To use the ` Duende.IdentityModel.AspNetCore.OAuth2Introspection ` library, you need to add the NuGet package to your ASP.NET Core project.
38
- You can do this by running the following command in your terminal:
36
+ If you want to use the ` Duende.AspNetCore.Authentication.OAuth2Introspection ` library, you need to add the NuGet package
37
+ to your ASP.NET Core project.
38
+
39
+ You can achieve this by running the following command in your terminal:
39
40
40
41
``` bash
41
- dotnet package add Duende.IdentityModel. AspNetCore.OAuth2Introspection
42
+ dotnet package add Duende.AspNetCore.Authentication .OAuth2Introspection
42
43
```
43
44
44
45
## Configuration
45
46
46
47
To configure the OAuth 2.0 token introspection handler in your ASP.NET Core application, you need to add it to the
47
48
authentication services in your ` Startup.cs ` or ` Program.cs ` file.
48
49
49
- Here's an example of how to set it up:
50
+ Here's an example on how to set it up:
50
51
51
52
``` csharp
52
53
// Program.cs
53
- using Duende .IdentityModel . AspNetCore .OAuth2Introspection ;
54
+ using Duende .AspNetCore . Authentication .OAuth2Introspection ;
54
55
55
56
builder .Services .AddAuthentication (OAuth2IntrospectionDefaults .AuthenticationScheme )
56
57
.AddOAuth2Introspection (options =>
@@ -62,7 +63,7 @@ builder.Services.AddAuthentication(OAuth2IntrospectionDefaults.AuthenticationSch
62
63
});
63
64
```
64
65
65
- More details on the available options can be found on the [ options page] ( /identitymodel-oauth2introspection /options.mdx ) .
66
+ More details on the available options can be found on the [ options page] ( /introspection-auth-handler /options.mdx ) .
66
67
67
68
### Configuring the Backchannel HTTP Client
68
69
@@ -85,7 +86,7 @@ builder.Services.AddHttpClient(OAuth2IntrospectionDefaults.BackchannelHttpClient
85
86
86
87
## License and Feedback
87
88
88
- ` Duende.IdentityModel. AspNetCore.OAuth2Introspection ` is released as open source under the
89
+ ` Duende.AspNetCore.Authentication .OAuth2Introspection ` is released as open source under the
89
90
[ Apache 2.0 license] ( https://github.com/DuendeSoftware/foss/blob/main/LICENSE ) .
90
91
Bug reports and contributions are welcome at
91
92
[ the GitHub repository] ( https://github.com/DuendeSoftware/foss ) .
@@ -97,7 +98,7 @@ Bug reports and contributions are welcome at
97
98
description = " View the source code for this library on GitHub."
98
99
/>
99
100
<LinkCard
100
- href = " https://www.nuget.org/packages/Duende.IdentityModel. AspNetCore.OAuth2Introspection/ "
101
+ href = " https://www.nuget.org/packages/Duende.AspNetCore.Authentication. OAuth2Introspection"
101
102
title = " NuGet Package"
102
103
description = " View the package on NuGet.org."
103
104
/>
0 commit comments