I have 2 pages in my application - Login and Books Listing (for a moment books data is already entered into database). What I want to do is adding a claim after successful login and I should we able to use that claim in my bookscontroller page to put condition based on the claim.
To add claim - I am writing the following code, but I am not able to find some of the class reference (classes are mentioned in bold).
var claims = new List<Claim>();
claims.Add(new Claim(ClaimTypes.WindowsAccountName, Environment.UserName));
claims.Add(new Claim(ClaimTypes.Email, model.Email));
var identity = new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie);
AuthenticationManager.SignIn(identity);
This same code works with ASP.Net4 template. Please help.