/deveel.identity.mongodb

The implementation of the MongoDB storage layer for the Microsoft Identity Core framework

Primary LanguageC#Apache License 2.0Apache-2.0

Deveel Identity - MongoDB

Build Code Coverage Maintainability Nuget

This is an implementation of the storage layer of the Microsoft Identity framework that supports MongoDB as persistent database system.

The model provided by this library supports all the standards requested by the framework for handling of the User Type and the Role Type, plus an extension to multi-tenancy scenarios.

Motivation

At the time this project was started (February 2022), several libraries already existed to support the MongoDB database storage layer for the previous version of the framework (ASP.NET Core Identity Core), but at certain point Microsoft rebooted the project and forked it (as Microsoft Extensions Identity), and despite the functional gap between the two frameworks is small, yet it is important (Data Protection, Authentication Keys, etc.).

Furthermore, given that the other available libraries are based on a discontinued line, we wanted to provide a version of the storage system anchored to the current efforts and updated revisions of the framework.

Usage

Starting to use the functions provided by the library is fairly easy and it ony requires invoking one of the overloads of the IdentityBuilder utility during the service registration process.

using System;

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

using Deveel.Security;

namespace Example {
    public class Startup {
        public Startup(IConfiguration config) {
            Configuration = config;
        }

        public IConfiguration Configuration { get; }

        public void Configure(IServiceCollection services) {
            // ... add any other service you need ...

            // this call adds the basic MongoDB storage layer
            // using the configurations from the sub-section Mongo:Identity
            services.AddIdentityCore<MongoUser>()
                .AddMongoStores(Configuration, "Mongo:Identity");
        }
    }
}

The above example is the simplest access point to the functions provided, and if you want to explore more how to tweak your configuration of the layer, visit the Documentation we have provided

Contribute

Contributions to open-source projects, like Deveel Identity - MongoDB, is generally driven by interest in using the product and services, if they would respect some of the expectations we have to its functions.

The best ways to contribute and improve the quality of this project is by trying it, filing issues, joining in design conversations, and make pull-requests.

Please refer to the Contributing Guidelines to receive more details on how you can contribute to this project.

We aim to address most of the questions you might have by providing documentations, answering frequently asked questions and following up on issues like bug reports and feature requests.

Contributors

License Information

This project is released under the Apache 2 Open-Source Licensing agreement.