Skip to content

IdentityServer.V3.Mongo is a persistence layer for Thinktecture's IdentityServer v3 configuration data that uses MongoDb as a data store

License

Notifications You must be signed in to change notification settings

jageall/IdentityServer.v3.MongoDb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDb Persistence for IdentityServer3

Current status: RC1

This package supports the IdentityServer functionality. For administrative functions see the admin project. There is also a powershell module available.

Build Status

Build status

Usage

public class Startup
{
    public void Configuration(IAppBuilder app)
    {
        // Register your IUserService implementation
        var userService = new Registration<IUserService>(/*Insert your user service here*/);

        // Create and modify default settings
        var settings = IdentityServer.MongoDb.StoreSettings.DefaultSettings();
        settings.ConnectionString = "mongodb://localhost";

        // Create the MongoDB factory
        var factory = new IdentityServer.MongoDb.ServiceFactory(userService, settings);

        // Overwrite services, e.g. with in memory stores
        factory.Register(new Registration<IEnumerable<Client>>(MyClients.Get()));
        factory.ClientStore = new Registration<IClientStore>(typeof(InMemoryClientStore));

        var options = new IdentityServerOptions()
        {
            Factory = factory,
        };

        app.Map("/idsrv", idServer =>
        {
            idServer.UseIdentityServer(options);
        });
    }

Credits

MongoDb Persistence for Thinktecture IdentityServer is built using the following great open source projects:

About

IdentityServer.V3.Mongo is a persistence layer for Thinktecture's IdentityServer v3 configuration data that uses MongoDb as a data store

Resources

License

Stars

Watchers

Forks

Packages

No packages published