21 lines
737 B
C#
21 lines
737 B
C#
using System.Security.Claims;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNet.Identity;
|
|
using Microsoft.AspNet.Identity.EntityFramework;
|
|
|
|
namespace Forum.DataAccessLayer.Models
|
|
{
|
|
public class ProfessionalUser : IdentityUser
|
|
{
|
|
public string FullName { get; set; }
|
|
|
|
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ProfessionalUser> 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;
|
|
}
|
|
}
|
|
}
|