Пример #1
0
        public static AppUserManager OwinCreate(IdentityFactoryOptions <AppUserManager> options, IOwinContext context)
        {
            var dbContext = context.Get <IAppDbContext>();
            var store     = new IdentityStore(dbContext);

            var manager = new AppUserManager(store);

            var dataProtectionProvider = options.DataProtectionProvider;

            if (dataProtectionProvider != null)
            {
                manager.UserTokenProvider =
                    new DataProtectorTokenProvider <User, int>(dataProtectionProvider.Create("ASP.NET Identity"));
            }

            return(manager);
        }
Пример #2
0
 public AppUserManager(IdentityStore store)
     : base(store)
 {
 }