Skip to content

IdentityModel.AspNetCore.OAuth2Introspection => Duende.AspNetCore.Authentication.OAuth2Introspection - #1022

Draft
dennisoehme wants to merge 1 commit into
nextfrom
duende
Draft

IdentityModel.AspNetCore.OAuth2Introspection => Duende.AspNetCore.Authentication.OAuth2Introspection#1022
dennisoehme wants to merge 1 commit into
nextfrom
duende

Conversation

@dennisoehme

Copy link
Copy Markdown
Collaborator

This MR migrates OAuth2 token introspection from the deprecated IdentityModel package to the maintained Duende package and tightens runtime safety for JWT-profile signing.

Why this change

  • IdentityModel.AspNetCore.OAuth2Introspection is deprecated / legacy and no longer maintained on NuGet.
  • The maintainers officially rebranded it to Duende.AspNetCore.Authentication.OAuth2Introspection and recommend updating references.
  • Duende is the actively maintained line with current docs/releases and net10.0 support, which matches this repository’s target.

What changed

  • Package migration

    • Directory.Packages.props
      • IdentityModel.AspNetCore.OAuth2Introspection 6.2.0 -> Duende.AspNetCore.Authentication.OAuth2Introspection 7.0.1
    • src/Zitadel/Zitadel.csproj
      • package reference switched to Duende
  • Namespace updates

    • src/Zitadel/Authentication/Options/ZitadelIntrospectionOptions.cs
      • using IdentityModel.AspNetCore.OAuth2Introspection -> using Duende.AspNetCore.Authentication.OAuth2Introspection
    • src/Zitadel/Extensions/ApplicationBuilderExtensions.cs
      • using IdentityModel.Client -> using Duende.IdentityModel.Client
      • added using Duende.AspNetCore.Authentication.OAuth2Introspection
  • Duende API alignment + safety fix

    • Removed options.EnableCaching = ... assignment (property not available in Duende 7 options).
    • Replaced unsafe authority usage in JWT profile flow:
      • before: GetSignedJwtAsync(options.Authority!)
      • now: fail-fast validate Authority, capture validated local authority, then call GetSignedJwtAsync(authority).
    • Added explicit configuration-time exception when JwtProfile is set but Authority is missing/blank.

Behavior impact

  • Functional behavior is unchanged for valid configurations.
  • Misconfigured JwtProfile flows now fail early with a clear error instead of relying on null-forgiving behavior.
  • This migration tracks the official maintained package line.

Official references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant