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 officialBouncyCastle.Cryptography
package (that shipped yesterday with native .NET Standard 2.0 support). It is expected that applications referencing both thePortable.BouncyCastle
andBouncyCastle.Cryptography
packages - directly or indirectly - will experience type conflicts, but such conflicts should eventually disappear once all libraries are updated to useBouncyCastle.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 acceptingbool
andlong
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!).