Beispiel #1
0
        //public override Task<ClaimsIdentity> CreateUserIdentityAsync(IdentityUser user) {
        //    return user.GenerateUserIdentityAsync((BifUserManager)UserManager);
        //}

        public static BifSignInManager Create(BifUserManager userManager)
        {
            if (_bifSignInManager == null)
            {
                _bifSignInManager = new BifSignInManager(userManager);
            }
            return(_bifSignInManager);
        }
Beispiel #2
0
        public static BifUserManager Create()
        {
            if (_bifUserManager != null)
            {
                return(_bifUserManager);
            }

            _bifUserManager = new BifUserManager {
                //UserLockoutEnabledByDefault = true,
                //DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5),
                //MaxFailedAccessAttemptsBeforeLockout = 5
            };

            return(_bifUserManager);
        }
Beispiel #3
0
 private BifSignInManager(BifUserManager userManager)
 {
     _bifUserManager = userManager;
 }
Beispiel #4
0
        //public class EmailService : IIdentityMessageService
        //{
        //    public Task SendAsync(IdentityMessage message)
        //    {
        //        // Plug in your email service here to send an email.
        //        return Task.FromResult(0);
        //    }
        //}

        //public class SmsService : IIdentityMessageService
        //{
        //    public Task SendAsync(IdentityMessage message)
        //    {
        //        // Plug in your SMS service here to send a text message.
        //        return Task.FromResult(0);
        //    }
        //}

        public void Dispose()
        {
            _bifUserManager = null;
        }