github openiddict/openiddict-core 4.0.0-preview6

latest releases: 5.8.0, 5.7.1, 5.7.0...
pre-release22 months ago

This preview release introduces the following changes:

  • The public APIs offered by OpenIddictClientService have been reworked to be much easier to use with the client credentials, resource owner password credentials and refresh token grants:
var services = new ServiceCollection();
services.AddOpenIddict()
    .AddClient(options =>
    {
        options.AddEphemeralEncryptionKey()
               .AddEphemeralSigningKey();

        options.DisableTokenStorage();

        options.UseSystemNetHttp();

        options.AddRegistration(new OpenIddictClientRegistration
        {
            Issuer = new Uri("http://localhost:58779/", UriKind.Absolute)
        });
    });

await using var provider = services.BuildServiceProvider();

var service = provider.GetRequiredService<OpenIddictClientService>();

var (response, principal) = await service.AuthenticateWithPasswordAsync(
    issuer: new Uri("https://localhost:58779/", UriKind.Absolute),
    username: "johndoe",
    password: "A3ddj3w");

var token = response.AccessToken;
  • Portable.BouncyCastle was replaced by the official BouncyCastle.Cryptography package (that shipped yesterday with native .NET Standard 2.0 support). It is expected that applications referencing both the Portable.BouncyCastle and BouncyCastle.Cryptography packages - directly or indirectly - will experience type conflicts, but such conflicts should eventually disappear once all libraries are updated to use BouncyCastle.Cryptography.

  • Most of the infrastructure types that are not meant to be derived/subclassed have been marked as sealed and decorated with [EditorBrowsable(EditorBrowsableState.Advanced)] or [EditorBrowsable(EditorBrowsableState.Never)] to make finding adequate hooks easier for third-party maintainers. Managers and stores - that are designed to be derived when necessary - are not affected by this change.

  • New ClaimsIdentity/ClaimsPrincipal.AddClaim/SetClaim() overloads accepting bool and long values have been added.

  • A regression introduced in the last preview that prevented the device authorization code flow from working properly has been fixed (thanks to the ABP team for reporting it! ❤️)

  • The Quartz.NET integration was tweaked to work better in clustered environments (thanks @Suchiman!).

Don't miss a new openiddict-core release

NewReleases is sending notifications on new releases.