Git Product home page Git Product logo

aspnetcore.identity.ravendb's Introduction

RavenDB v4.0 user/role persistent store for ASP.NET Core identity provider

The most complete and closest implementation of the user and role store to the original EntityFramework implementation, it's well documented, and includes very useful RavenDB extensions. Supports .NET Standard 2.0

NuGet GitHub license NuGet

Note: For RavenDB v3.5 persistence store switch the active branch to v3.x

ASP.NET Core Identity is a membership system which allows you to add login functionality to your application. Users can create an account and login with a user name and password or they can use an external login provider such as Facebook, Google, Microsoft Account, Twitter or others. You can configure ASP.NET Core Identity to use a RavenDB database to store user names, passwords, and profile data.

Installation via NuGet console

PM> Install-Package Maqduni.AspNetCore.Identity.RavenDb

Note: Extensions can also be installed as a standalone package,

PM> Install-Package Maqduni.RavenDb.Extensions

Usage

Need a jump-start? Refer to the sample .NET Core 2.0 web application

For comprehensive usage examples refer to the unit tests

Configuration Example (Startup.cs)

Register DocumentAsyncSession per each HTTP request, is used to store users/roles in the database. Adds the singleton DocumentStore internally.

public void ConfigureServices(IServiceCollection services)
{
    // Add ravendb services.
    services.AddRavenDbAsyncSession(Configuration.GetConnectionString("RavenDb"));

    services.AddIdentity<ApplicationUser, ApplicationRole>()
        .AddRavenDbStores()
        .AddDefaultTokenProviders();

    ...
}

Note:

  • DocumentStore is a singleton and AsyncSession gets instantiated per each HTTP request.
  • "{userCollectionName}/ClaimsAndLogins" index is created on application startup if it doesn't exist in the database. The identity provider relies on this index to enable user search by email, username, claims, and logins.

Contribute

Feel free to contribute to the project by either providing feedback or by forking and adding new features or fixing bugs.

aspnetcore.identity.ravendb's People

Contributors

maqduni avatar michaelschnyder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.