github openiddict/openiddict-core 7.0.0-preview.1

pre-release6 days ago

This release introduces the following changes:

  • All the ASP.NET Core and Entity Framework Core 2.1 references used for the .NET Framework and .NET Standard TFMs have been replaced by the new 2.3 packages released mid-January (including the .NET Standard 2.1 TFM, that previously referenced unsupported ASP.NET Core 3.1 packages).

Important

ASP.NET Core 2.3 replaces ASP.NET Core 2.1: as such, it is essential that all ASP.NET Core 2.1 applications running on .NET Framework 4.6.2+ quickly migrate to 2.3 to ensure they keep receiving security patches and critical bug fixes.

Caution

While it was released as a minor version update, ASP.NET Core 2.3 is not 100% compatible with ASP.NET Core 2.2, as none of the changes or APIs introduced in 2.2 - no longer supported since December 2019 - is present in 2.3.

When migrating to OpenIddict 7.0, you'll need to carefully review your dependencies to ensure your application doesn't accidentally depend on any ASP.NET Core 2.2-specific API or package and still runs fine on 2.3.

For more information, read https://devblogs.microsoft.com/dotnet/servicing-release-advisory-aspnetcore-23/ and dotnet/aspnetcore#58598.

  • All the OpenIddict packages now use 8.0 as the minimum .NET Extensions version for the .NET Framework and .NET Standard TFMs, which matches the approach used by the new ASP.NET Core/Entity Framework Core 2.3 packages (that all reference Microsoft.Extensions.* 8.0 packages instead of 2.1).

Important

Initial testing shows that OWIN/Katana or "legacy" ASP.NET 4.6.2+ applications are not negatively impacted by this change: in almost all cases, regenerating (or manually updating the binding redirects if necessary) after migrating to OpenIddict 7.0 should be enough. If you see regression that may be caused by this change, please post in this thread: #2262.

  • As part of the .NET Extensions 2.1 -> 8.0 change, the following improvements have been made:

    • The .NET Framework and .NET Standard TFMs now support TimeProvider and the associated properties in OpenIddictClientOptions, OpenIddictCoreOptions, OpenIddictQuartzOptions, OpenIddictServerOptions and OpenIddictValidationOptions are no longer nullable.

    • The .NET Framework and .NET Standard TFMs now support System.Text.Json.Nodes, which allows using JsonNode with OpenIddictParameter on older platforms.

  • Several improvements have been made to the OpenIddictParameter primitive:

    • The OpenIddictParameter constructors and static operators offering string?[]? conversions have been replaced by equivalents taking ImmutableArray<string?> or ImmutableArray<string?>? parameters, which guarantees that the underlying value wrapped by OpenIddictParameter cannot be accidentally mutated after being created.

    • The OpenIddictRequest.Audiences and OpenIddictRequest.Resources properties have been updated to use ImmutableArray<string?>? instead of string?[]?, which should prevent unsupported mutations like context.Request.Audiences[2] = "overridden audience" (which may or may not work in 6.x depending on the actual CLR type of the parameter value initially wrapped).

    • For similar reasons, JsonNode instances are now cloned by OpenIddictParameter's constructor and cloned by the JsonNode? conversion operator to prevent accidental mutations. As part of this change, the OpenIddictRequest.Claims and OpenIddictRequest.Registration properties are now of type JsonObject instead of JsonElement, which should make these properties easier to use.

    • The low-level/untyped OpenIddictParameter.Value property has been removed and replaced by a new (hidden) OpenIddictParameter.GetRawValue() to encourage users to leverage the built-in conversion operators instead. New Microsoft.Extensions.Primitives.StringValues conversion operators have been added to the OpenIddictParameter primitive as part of this change.

    • The ClaimsPrincipal.GetDestinations()/ClaimsPrincipal.SetDestinations() extensions now use ImmutableDictionary<string, ImmutableArray<string>> instead of ImmutableDictionary<string, string[]> for consistency with the previous changes.

    • The OpenIddictParameter structure was updated to use the JsonNode.DeepEquals(), JsonElement.DeepEquals() or JsonElement.GetPropertyCount() APIs when available.

  • The APIs obsoleted in OpenIddict 6.x have been removed.

  • The net6.0 target framework monikers have been removed.

Don't miss a new openiddict-core release

NewReleases is sending notifications on new releases.