d0pare / AspNetCore.Identity.Neo4j

ASP.NET Core Identity provider based on Neo4j

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AspNetCore.Identity.Neo4j

AspNetCore.Identity.Neo4j Nuget library is using official Neo4j.Driver to connect to Neo4j graph database.

Minimal setup

public void ConfigureServices(IServiceCollection services)
{
    services.AddSingleton(s => GraphDatabase.Driver(Configuration.GetConnectionString("DefaultConnection"), AuthTokens.Basic("neo4j", "neo4j")));
    services.AddScoped(s => s.GetService<IDriver>().Session());

    services.AddIdentity<ApplicationUser, Neo4jIdentityRole>()
            .AddNeo4jDataStores()
            .AddDefaultTokenProviders();

    ...
}

About

ASP.NET Core Identity provider based on Neo4j

License:Other


Languages

Language:C# 100.0%