Roles are also claims; claims are more general.
In almost every related blog post or question here, he advises using assertions and avoiding roles.
, , " ".
" ". , , , , .
, ClaimsPrincipal Role, ASP.NET , , - WebForms, MVC .
, , , .
http://www.wiktorzychla.com/2014/11/forms-authentication-revisited-for-net.html
, ,
var identity = new ClaimsIdentity( "custom" );
identity.AddClaim( new Claim( ClaimTypes.Name, txtLogin.Text ) );
identity.AddClaim( new Claim( ClaimTypes.Role, "admin" ) );
var principal = new ClaimsPrincipal( identity );
, " 18 " " , ". "", .
,
https://msdn.microsoft.com/en-us/library/system.security.claims.claimsauthorizationmanager(v=vs.110).aspx