Enx.OpenIddict.RavenDB
0.2.0
See the version list below for details.
dotnet add package Enx.OpenIddict.RavenDB --version 0.2.0
NuGet\Install-Package Enx.OpenIddict.RavenDB -Version 0.2.0
<PackageReference Include="Enx.OpenIddict.RavenDB" Version="0.2.0" />
<PackageVersion Include="Enx.OpenIddict.RavenDB" Version="0.2.0" />
<PackageReference Include="Enx.OpenIddict.RavenDB" />
paket add Enx.OpenIddict.RavenDB --version 0.2.0
#r "nuget: Enx.OpenIddict.RavenDB, 0.2.0"
#:package Enx.OpenIddict.RavenDB@0.2.0
#addin nuget:?package=Enx.OpenIddict.RavenDB&version=0.2.0
#tool nuget:?package=Enx.OpenIddict.RavenDB&version=0.2.0
Enx.OpenIddict.RavenDB
RavenDB storage provider for OpenIddict — the flexible, standards-compliant OpenID Connect/OAuth 2.0 server framework for ASP.NET Core.
Overview
Enx.OpenIddict.RavenDB implements all four OpenIddict core store interfaces backed by RavenDB, enabling you to use a document-oriented database as the persistence layer for your OpenID Connect / OAuth 2.0 server.
| OpenIddict entity | Store implemented |
|---|---|
| Application | OpenIddictRavenDBApplicationStore<T> |
| Authorization | OpenIddictRavenDBAuthorizationStore<T> |
| Scope | OpenIddictRavenDBScopeStore<T> |
| Token | OpenIddictRavenDBTokenStore<T> |
Requirements
- .NET Standard 2.0 / 2.1, .NET 8, or .NET 10
- OpenIddict 7.x
- RavenDB.Client 7.x
Installation
dotnet add package Enx.OpenIddict.RavenDB
The models package is included transitively. If you need to reference the entity types directly in a separate project, add:
dotnet add package Enx.OpenIddict.RavenDB.Models
Getting started
1. Configure RavenDB
Register your RavenDB IDocumentStore as usual before configuring OpenIddict:
builder.Services.AddSingleton<IDocumentStore>(provider =>
{
var store = new DocumentStore
{
Urls = ["http://localhost:8080"],
Database = "MyApp"
};
store.Initialize();
return store;
});
// Register a scoped async session used by the OpenIddict stores
builder.Services.AddScoped(provider =>
provider.GetRequiredService<IDocumentStore>().OpenAsyncSession());
2. Register OpenIddict with the RavenDB provider
builder.Services.AddOpenIddict()
.AddCore(options =>
{
options.UseRavenDB();
})
.AddServer(options =>
{
// ... your server configuration
});
3. Deploy RavenDB indexes
The library ships with custom RavenDB indexes for efficient querying. Deploy them once at startup:
var store = app.Services.GetRequiredService<IDocumentStore>();
await IndexCreation.CreateIndexesAsync(
typeof(OpenIddictRavenDBApplication).Assembly, store);
Custom entities
All entity types are extensible. Inherit from the base model, then tell OpenIddict to use your custom type:
public class MyApplication : OpenIddictRavenDBApplication
{
public string? Tenant { get; set; }
}
builder.Services.AddOpenIddict()
.AddCore(options =>
{
options.UseRavenDB(ravendb =>
{
ravendb.ReplaceDefaultApplicationEntity<MyApplication>();
});
});
The same pattern applies to ReplaceDefaultAuthorizationEntity<T>, ReplaceDefaultScopeEntity<T>, and ReplaceDefaultTokenEntity<T>.
Entity models
| Model | Key properties |
|---|---|
OpenIddictRavenDBApplication |
ClientId, ClientSecret, DisplayName, RedirectUris, Permissions, Requirements |
OpenIddictRavenDBAuthorization |
ApplicationId, Subject, Status, Scopes, CreationDate |
OpenIddictRavenDBScope |
Name, DisplayName, Description, Resources |
OpenIddictRavenDBToken |
ApplicationId, AuthorizationId, Subject, Type, Status, ExpirationDate, Payload |
Contributing
Contributions are welcome. Please open an issue before submitting a pull request for significant changes.
License
This project is licensed under the MIT License. Copyright © 2026 Jean-François Pustay.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Enx.OpenIddict.RavenDB.Models (>= 0.2.0)
- OpenIddict.Core (>= 7.4.0)
- RavenDB.Client (>= 7.2.1)
-
.NETStandard 2.1
- Enx.OpenIddict.RavenDB.Models (>= 0.2.0)
- OpenIddict.Core (>= 7.4.0)
- RavenDB.Client (>= 7.2.1)
-
net10.0
- Enx.OpenIddict.RavenDB.Models (>= 0.2.0)
- OpenIddict.Core (>= 7.4.0)
- RavenDB.Client (>= 7.2.1)
-
net8.0
- Enx.OpenIddict.RavenDB.Models (>= 0.2.0)
- OpenIddict.Core (>= 7.4.0)
- RavenDB.Client (>= 7.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.