Posted on: 3/12/2014 9:29:54 PM | Views : 1418

Hi,
I'm using ASP.NET Identity 2.0 Beta 1. I have some problems with using my own custom claims (I don't think it is Beta specific).
I added this code to SignInAsyn in AccountController:
userIdentity.AddClaim(new Claim("FullName", "My full name")); Here the complete method:
private async Task SignInAsync(ApplicationUser user, bool isPersistent, bool rememberBrowser) { // Clear any partial cookies from external or two factor partial sign ins AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie, DefaultAuthenticationTypes.TwoFactorCookie); var userIdentity = await user.GenerateUserIdentityAsync(UserManager); // Here my custom claims userIdentity.AddClaim(new Claim("FullName", "My full name")); userIdentity.AddClaim(new Claim("EmployeeId", "My employee id")); if (remember ...

Go to the complete details ...