Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
- public class ElevenNoteApplicationUser : IdentityUser
- {
- /// <summary>
- /// This version of the method GenerateUserIdentityAsync is used with the
- /// ASP.NET MVC website data context requests because the authentication type is usually Cookie-based.
- /// </summary>
- /// <param name="manager"></param>
- /// <returns></returns>
- public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ElevenNoteApplicationUser> 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;
- }
- /// <summary>
- /// This version of the method GenerateUserIdentityAsync is used with the
- /// WebAPI data context requests because the authentication type could vary.
- /// </summary>
- /// <param name="manager"></param>
- /// <param name="authenticationType"></param>
- /// <returns></returns>
- public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ElevenNoteApplicationUser> manager, string authenticationType)
- {
- // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
- var userIdentity = await manager.CreateIdentityAsync(this, authenticationType);
- // Add custom user claims here
- return userIdentity;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement