示例#1
0
文件: User.cs 项目: madking2010/CarPr
 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<User> 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;
 }
示例#2
0
 public RequestGUsController()
 {
     userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db));
 }
示例#3
0
 public UserProfilesController()
 {
     userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db));
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing && UserManager != null)
     {
         UserManager.Dispose();
         UserManager = null;
     }
     base.Dispose(disposing);
 }
 public AccountController(UserManager<ApplicationUser> userManager)
 {
     UserManager = userManager;
 }
示例#6
0
 public FriendsController()
 {
     userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db));
 }