Guest User

Untitled

a guest
Dec 14th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public class UserA : IdentityUser
  2. {
  3. . . .
  4.  
  5. public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<UserA > manager)
  6. {
  7. var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
  8.  
  9. // Add custom user claims here
  10.  
  11. return userIdentity;
  12. }
  13. }
  14.  
  15. public class UserB : IdentityUser
  16. {
  17. . . .
  18.  
  19. public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<UserB > manager)
  20. {
  21. var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
  22.  
  23. // Add custom user claims here
  24.  
  25. return userIdentity;
  26. }
  27. }
Add Comment
Please, Sign In to add comment