23 references to Role
BasicWebSite (1)
BasicAuthenticationHandler.cs (1)
29new Claim(ClaimTypes.Role, "Administrator"),
CookieSessionSample (1)
Startup.cs (1)
39claims.Add(new Claim(ClaimTypes.Role, "SomeRandomGroup" + i, ClaimValueTypes.String, "IssuedByBob", "OriginalIssuerJoe"));
dotnet-user-jwts (1)
Helpers\JwtIssuer.cs (1)
41identity.AddClaims(rolesToAdd.Select(r => new Claim(ClaimTypes.Role, r)));
Identity.DefaultUI.WebSite (1)
Pages\Contoso\Login.cshtml.cs (1)
61ClaimTypes.Role);
Microsoft.AspNetCore.Authorization.Test (11)
AuthorizationMiddlewareTests.cs (3)
1016new Claim(ClaimTypes.Role, "Administrator"), 1017new Claim(ClaimTypes.Role, "User"), 1026new Claim(ClaimTypes.Role, "Token"),
DefaultAuthorizationServiceTests.cs (8)
349.RequireClaim(ClaimTypes.Role, "User"); 354new Claim(ClaimTypes.Role, "User"), 355new Claim(ClaimTypes.Role, "Administrator") 371var policy = new AuthorizationPolicyBuilder().RequireClaim(ClaimTypes.Role); 376new Claim(ClaimTypes.Role, "none"), 412new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Role, "Admin") }, "AuthType") 429new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Role, "Users") }, "AuthType")); 447new Claim(ClaimTypes.Role, "Nope"),
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
62Assert.Equal("role", FindClaimValue(transaction3, ClaimTypes.Role));
Microsoft.AspNetCore.Identity.Test (1)
IdentityOptionsTest.cs (1)
31Assert.Equal(ClaimTypes.Role, options.ClaimsIdentity.RoleClaimType);
Microsoft.AspNetCore.Mvc.Core.Test (3)
Authorization\AuthorizeFilterTest.cs (3)
579new Claim(ClaimTypes.Role, "Administrator"), 580new Claim(ClaimTypes.Role, "User"), 589new Claim(ClaimTypes.Role, "Token"),
Microsoft.Extensions.Identity.Core (2)
ClaimsIdentityOptions.cs (2)
14/// Gets or sets the ClaimType used for a Role claim. Defaults to <see cref="ClaimTypes.Role"/>. 16public string RoleClaimType { get; set; } = ClaimTypes.Role;
System.Security.Claims (1)
System\Security\Claims\ClaimsIdentity.cs (1)
44public const string DefaultRoleClaimType = ClaimTypes.Role;