Пример #1
0
        public async Task <ClaimsIdentity> GenerateUserIdentityAsync(CustomUserManager manager)
        {
            // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
            var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);

            // Add custom user claims here
            return(userIdentity);
        }
        public static CustomUserManager Create(IdentityFactoryOptions <CustomUserManager> options,
                                               IOwinContext context)
        {
            if (FolderStorage == null)
            {
                throw new NullReferenceException(string.Format("FolderStorage is null.  did you forget to set CustomUserManager.FolderStorage to a proper path"));
            }
            var manager = new CustomUserManager(new JsonUserStore(FolderStorage));

            return(manager);
        }
 public CustomSignInManager(CustomUserManager userManager, IAuthenticationManager authenticationManager)
     : base(userManager, authenticationManager)
 {
 }