Enx.OpenIddict.RavenDB.Models 0.4.0

dotnet add package Enx.OpenIddict.RavenDB.Models --version 0.4.0
                    
NuGet\Install-Package Enx.OpenIddict.RavenDB.Models -Version 0.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Enx.OpenIddict.RavenDB.Models" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Enx.OpenIddict.RavenDB.Models" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Enx.OpenIddict.RavenDB.Models" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Enx.OpenIddict.RavenDB.Models --version 0.4.0
                    
#r "nuget: Enx.OpenIddict.RavenDB.Models, 0.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Enx.OpenIddict.RavenDB.Models@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Enx.OpenIddict.RavenDB.Models&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Enx.OpenIddict.RavenDB.Models&version=0.4.0
                    
Install as a Cake Tool

Enx.OpenIddict.RavenDB

RavenDB storage provider for OpenIddict — the flexible, standards-compliant OpenID Connect/OAuth 2.0 server framework for ASP.NET Core.

NuGet CI codecov License: MIT

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. (Optional) Use static indexes

By default the stores rely on RavenDB auto-indexes. If you prefer pre-defined static indexes for better performance in production, enable the option and deploy the bundled indexes once at startup:

builder.Services.AddOpenIddict()
    .AddCore(options =>
    {
        options.UseRavenDB(ravendb =>
        {
            ravendb.Configure(o => o.UseStaticIndexes = true);
        });
    });
var store = app.Services.GetRequiredService<IDocumentStore>();
await new ApplicationIndex<OpenIddictRavenDBApplication>().ExecuteAsync(store);
await new AuthorizationIndex<OpenIddictRavenDBAuthorization>().ExecuteAsync(store);
await new ScopeIndex<OpenIddictRavenDBScope>().ExecuteAsync(store);
await new TokenIndex<OpenIddictRavenDBToken>().ExecuteAsync(store);

If you are using custom entities, pass your types instead:

await new ApplicationIndex<MyApplication>().ExecuteAsync(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 ApplicationType, ClientId, ClientSecret, ConsentType, DisplayName, DisplayNames, JsonWebKeySet, Permissions, PostLogoutRedirectUris, Properties, RedirectUris, Requirements, Settings, Type
OpenIddictRavenDBAuthorization ApplicationId, CreationDate, Properties, Scopes, Tokens, Status, Subject, Type
OpenIddictRavenDBScope Name, DisplayName, DisplayNames, Description, Descriptions, Properties, Resources
OpenIddictRavenDBToken ApplicationId, AuthorizationId, CreationDate, ExpirationDate, Payload, Properties, RedemptionDate, ReferenceId, Status, Subject, Type

Roadmap

The library is currently in pre-release. Version 1.0 will be published once end-to-end scenario tests (authorization code flow, client credentials, token introspection, etc.) are in place and passing.

Contributions to the test suite are especially welcome.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Enx.OpenIddict.RavenDB.Models:

Package Downloads
Enx.OpenIddict.RavenDB

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 138 4/27/2026
0.3.0 141 4/25/2026
0.2.0 129 4/22/2026
0.1.2 756 5/24/2021
0.1.1 646 5/24/2021
0.1.0 670 5/23/2021