예제 #1
0
        public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser, int> manager, ApplicationUser user)
        {
            var userIdentity = await manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);

            // Add custom user claims here
            return userIdentity;
        }
예제 #2
0
 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<IdentityUser> manager, IdentityUser user)
 {
     // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
     var userIdentity = await manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
     // Add custom user claims here
     return userIdentity;
 }
예제 #3
0
 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager manager, User user)
 {
     var userIdentity = await manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
     return userIdentity;
 }