I'm very happy to announce that OpenIddict 1.0 and 2.0 final packages were pushed earlier today to NuGet.org and are now officially available!
What changed new since RC3?
A security bug was fixed
A few days ago, a vulnerability impacting application permissions was publicly reported by nurhat on GitHub (many thanks to him!).
In a nutshell, scope permissions were not correctly enforced for public clients using the password flow and custom grant types (confidential clients or clients using the code or client credentials flows were not impacted).
A fix was immediately added to the nightly builds and is present in the RTM release.
Built-in entity caches are now included
OpenIddict now comes with built-in entity caching to avoid having to send multiple requests to retrieve the same entities. Concretely, if your AuthorizationController
uses APIs like OpenIddictApplicationManager.FindByClientIdAsync(request.ClientId)
, the corresponding application will be directly retrieved from the cache and the resulting operation will be extremely cheap.
To ensure this feature works with non-thread-safe stores and stores that rely on context-affinity (like Entity Framework 6.x or Entity Framework Core), these built-in caches are scoped so that cached entities are not reused across requests.
While definitely not recommended, this feature can be disabled via the OpenIddict core options:
1 | services.AddOpenIddict() |
The event model was slightly reworked
Based on feedback, the event model used by the server and validation handlers was slightly reworked so that it's now more explicit whether next handlers are allowed to be invoked by OpenIddict or not.
Concretely, both IOpenIddictServerEventHandler.HandleAsync()
and IOpenIddictValidationEventHandler.HandleAsync()
now return an enum value indicating whether the other handlers can be invoked. Here's an example of the new syntax:
1 | public class PasswordGrantTypeEventHandler : IOpenIddictServerEventHandler<HandleTokenRequest> |
1 | public class RefreshTokenGrantTypeEventHandler : IOpenIddictServerEventHandler<HandleTokenRequest> |
1 | services.AddOpenIddict() |
What package(s) should I reference?
OpenIddict supports both ASP.NET Core 1.x and 2.x so if you're still on the former version, no need to hurry: both versions basically offer the same feature set, with only a few API differences. For clarity, the OpenIddict packages use the 1.x
pattern for the ASP.NET Core 1.x-compatible version and 2.x
for ASP.NET Core 2.x.
Here's the complete list of packages published as part of this release:
ASP.NET Core version | Package name | Package version | Package description |
---|---|---|---|
1.x | OpenIddict | 1.0.0 | References the OpenIddict abstractions, core, server and validation packages. |
1.x | OpenIddict.Abstractions | 1.0.0 | Contains the common managers/stores interfaces used by OpenIddict. |
1.x | OpenIddict.Core | 1.0.0 | Contains the default managers implementations used by OpenIddict. |
1.x | OpenIddict.EntityFramework | 1.0.0 | Contains the Entity Framework 6.x stores (only compatible with .NET Framework 4.5.1). |
1.x | OpenIddict.EntityFramework.Models | 1.0.0 | Contains the Entity Framework 6.x models. |
1.x | OpenIddict.EntityFrameworkCore | 1.0.0 | Contains the Entity Framework Core stores. |
1.x | OpenIddict.EntityFrameworkCore.Models | 1.0.0 | Contains the Entity Framework Core models. |
1.x | OpenIddict.MongoDb | 1.0.0 | Contains the MongoDB 2.7.0 stores. |
1.x | OpenIddict.MongoDb.Models | 1.0.0 | Contains the MongoDB 2.7.0 models. |
1.x | OpenIddict.Mvc | 1.0.0 | Contains the OpenIddict/ASP.NET Core MVC integration components. |
1.x | OpenIddict.Server | 1.0.0 | Contains the OpenIddict server services. |
1.x | OpenIddict.Validation | 1.0.0 | Contains the OpenIddict validation services. |
2.x | OpenIddict | 2.0.0 | References the OpenIddict abstractions, core, server and validation packages. |
2.x | OpenIddict.Abstractions | 2.0.0 | Contains the common managers/stores interfaces used by OpenIddict. |
2.x | OpenIddict.Core | 2.0.0 | Contains the default managers implementations used by OpenIddict. |
2.x | OpenIddict.EntityFramework | 2.0.0 | Contains the Entity Framework 6.x stores (only compatible with .NET Framework 4.6.1). |
2.x | OpenIddict.EntityFramework.Models | 2.0.0 | Contains the Entity Framework 6.x models. |
2.x | OpenIddict.EntityFrameworkCore | 2.0.0 | Contains the Entity Framework Core stores. |
2.x | OpenIddict.EntityFrameworkCore.Models | 2.0.0 | Contains the Entity Framework Core models. |
2.x | OpenIddict.MongoDb | 2.0.0 | Contains the MongoDB 2.7.0 stores. |
2.x | OpenIddict.MongoDb.Models | 2.0.0 | Contains the MongoDB 2.7.0 models. |
2.x | OpenIddict.Mvc | 2.0.0 | Contains the OpenIddict/ASP.NET Core MVC integration components. |
2.x | OpenIddict.Server | 2.0.0 | Contains the OpenIddict server services. |
2.x | OpenIddict.Validation | 2.0.0 | Contains the OpenIddict validation services. |
Support lifecycle
Both OpenIddict 1.0 and 2.0 will be supported for as long as the ASP.NET Core version they are written for gets updates from Microsoft. You can find their support policy on Microsoft.com.
What's next?
While I'll probably mostly focus on improving OrchardCore's OpenID module (which is based on OpenIddict) during the next few weeks, OpenIddict itself will also get updates, including NHibernate 5 stores (that will likely be OpenIddict 2.0-only as NHibernate doesn't offer a netstandard1.x
TFM that would be required to work with .NET Core 1.x).
Depending on the demand, stores for RavenDB or other databases might also be part of the next update. Don't hesitate to contact me if you'd like to see a particular database supported in the next version.