// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Identity.InMemory; using Microsoft.Framework.DependencyInjection; namespace Microsoft.AspNet.Identity { public static class IdentityBuilderExtensions { public static IdentityBuilder AddInMemory(this IdentityBuilder builder) where TUser : IdentityUser where TRole : IdentityRole { builder.Services.AddSingleton, InMemoryUserStore>(); builder.Services.AddScoped, UserManager>(); builder.Services.AddSingleton, InMemoryRoleStore>(); builder.Services.AddScoped, RoleManager>(); return builder; } } }