Skip to content

Automatically register IOptionsChangeTokenSource<TOptions> implementations to enable cascade re-evaluation of options#2479

Merged
kevinchalet merged 1 commit into
openiddict:devfrom
kevinchalet:options_reload
Jun 1, 2026
Merged

Automatically register IOptionsChangeTokenSource<TOptions> implementations to enable cascade re-evaluation of options#2479
kevinchalet merged 1 commit into
openiddict:devfrom
kevinchalet:options_reload

Conversation

@kevinchalet

Copy link
Copy Markdown
Member

Fixes #2476.

Note: I considered doing that for AuthenticationOptions (so that new authentication scheme forwarders could be automatically registered when options are reloaded) and HttpClientFactoryOptions (so that new actions are registered when reloading OpenIddict*SystemNetHttpOptions but:

  • ASP.NET Core's authentication service doesn't support reloading AuthenticationOptions (or more precisely, it has no effect since the settings are directly extracted in the constructor and the class doesn't use IChangeToken to track changes).
  • The HTTP client options used by OpenIddict have dynamic names that can't be used with IOptionsChangeTokenSource<TOptions>.

…tions to enable cascade re-evaluation of options
@kevinchalet kevinchalet added this to the 8.0.0-preview.1 milestone Jun 1, 2026
@kevinchalet kevinchalet self-assigned this Jun 1, 2026
@kevinchalet kevinchalet changed the title Automatically register IOptionsChangeTokenSource<TOptions> implementations to enable cascade re-evaluation of options Automatically register IOptionsChangeTokenSource<TOptions> implementations to enable cascade re-evaluation of options Jun 1, 2026
@kevinchalet kevinchalet merged commit d45774b into openiddict:dev Jun 1, 2026
6 checks passed
@kevinchalet kevinchalet deleted the options_reload branch June 1, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically register IOptionsChangeTokenSource<TOptions> implementations to enable cascade re-evaluation of options

1 participant