Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use a NoSQL for Identity Server 4?

I'm trying to integrate a NoSql data store into Identity Server 4 such as Cosmos DB. I was wondering if someone out there has done something similar and/or if it's possible.

like image 744
Dustin Avatar asked Aug 23 '17 18:08

Dustin


People also ask

What will happen to Identity Server 4?

The current version (IdentityServer4 v4. x) will be the last version we work on as free open source. We will keep supporting IdentityServer4 until the end of life of . NET Core 3.1 in November 2022.

Is Identity Server 4 still free?

About IdentityServer4IdentityServer is a free, open source OpenID Connect and OAuth 2.0 framework for ASP.NET Core.


1 Answers

Off-course, It is possible to use NoSQL database for IdentityServer4. Why not?

Here is an example with MongoDB

"initial plumbing" in ConfigureServices() method at startup.cs.

 public void ConfigureServices(IServiceCollection services)
  { 
  ...
    // ---  configure identity server with MONGO Repository for stores, keys, clients and scopes ---
    services.AddIdentityServer()
           .AddTemporarySigningCredential()
           .AddMongoRepository()
           .AddClients()
           .AddIdentityApiResources()
           .AddPersistedGrants()
           .AddTestUsers(Config.GetUsers());
  ...
  }

There is another github project cloudscribe, ASP.NET Core multi-tenant web application foundation with management for sites, users, roles, claims and more. This project is implementing PostgreSQL (ORDBMS) and MySql for IdentityServer. In this project, you can get the idea about how to implement a system that allows switching among databases.

like image 129
MJK Avatar answered Sep 28 '22 00:09

MJK