net8.0net9.0net10.0
ASP.NET Core authentication handler for validating tokens using OAuth 2.0 introspection
Published
Oct 15, 2025
1y ago
Total Downloads
1.1M
1,124,684
Install
dotnet add package Duende.AspNetCore.Authentication.OAuth2Introspection --version 7.0.0-preview.1
| Product | Versions |
|---|---|
| .NET |
README
Duende.AspNetCore.Authentication.OAuth2Introspection
ASP.NET Core authentication handler for OAuth 2.0 token introspection.
https://tools.ietf.org/html/rfc7662
Configuration
services.AddAuthentication(OAuth2IntrospectionDefaults.AuthenticationScheme)
.AddOAuth2Introspection(options =>
{
options.Authority = "https://base_address_of_token_service";
options.ClientId = "client_id_for_introspection_endpoint";
options.ClientSecret = "client_secret_for_introspection_endpoint";
});
Configuring Backchannel HTTP Client
If configuration, such as using a proxy, is required for the HTTP client calling the Authority then it can be done by registering a named HTTP Client as follows
services.AddHttpClient(OAuth2IntrospectionDefaults.BackChannelHttpClientName)
.AddHttpMessageHandler(() =>
{
//Configure client/handler for the back channel HTTP Client here
return new HttpClientHandler
{
UseProxy = true,
Proxy = new WebProxy(WebProxyUri, true)
};
}
Changes from Previous Version
v6.3.0v7.0.0-preview.1
Added Frameworks
net10.0
Added Dependencies
Duende.IdentityModel(net10.0)
Microsoft.Extensions.Caching.Hybrid(net10.0)
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.