21 references to ClaimsIdentity
Microsoft.AspNetCore.Identity (3)
SignInManager.cs (3)
279
if (await ValidateSecurityStampAsync(user, principal.FindFirstValue(Options.
ClaimsIdentity
.SecurityStampClaimType)))
302
if (await ValidateSecurityStampAsync(user, principal.FindFirstValue(Options.
ClaimsIdentity
.SecurityStampClaimType)))
793
rememberBrowserIdentity.AddClaim(new Claim(Options.
ClaimsIdentity
.SecurityStampClaimType, stamp));
Microsoft.AspNetCore.Identity.Test (9)
IdentityOptionsTest.cs (4)
31
Assert.Equal(ClaimTypes.Role, options.
ClaimsIdentity
.RoleClaimType);
32
Assert.Equal(ClaimTypes.Name, options.
ClaimsIdentity
.UserNameClaimType);
33
Assert.Equal(ClaimTypes.NameIdentifier, options.
ClaimsIdentity
.UserIdClaimType);
34
Assert.Equal("AspNet.Identity.SecurityStamp", options.
ClaimsIdentity
.SecurityStampClaimType);
UserClaimsPrincipalFactoryTest.cs (5)
97
claims, c => c.Type == manager.Options.
ClaimsIdentity
.UserNameClaimType && c.Value == user.UserName);
98
Assert.Contains(claims, c => c.Type == manager.Options.
ClaimsIdentity
.UserIdClaimType && c.Value == user.Id);
99
Assert.Equal(supportsUserEmail, claims.Any(c => c.Type == manager.Options.
ClaimsIdentity
.EmailClaimType && c.Value == user.Email));
100
Assert.Equal(supportRoles, claims.Any(c => c.Type == manager.Options.
ClaimsIdentity
.RoleClaimType && c.Value == "Admin"));
101
Assert.Equal(supportRoles, claims.Any(c => c.Type == manager.Options.
ClaimsIdentity
.RoleClaimType && c.Value == "Local"));
Microsoft.Extensions.Identity.Core (9)
UserClaimsPrincipalFactory.cs (7)
76
Options.
ClaimsIdentity
.UserNameClaimType,
77
Options.
ClaimsIdentity
.RoleClaimType);
78
id.AddClaim(new Claim(Options.
ClaimsIdentity
.UserIdClaimType, userId));
79
id.AddClaim(new Claim(Options.
ClaimsIdentity
.UserNameClaimType, userName!));
85
id.AddClaim(new Claim(Options.
ClaimsIdentity
.EmailClaimType, email));
90
id.AddClaim(new Claim(Options.
ClaimsIdentity
.SecurityStampClaimType,
144
id.AddClaim(new Claim(Options.
ClaimsIdentity
.RoleClaimType, roleName));
UserManager.cs (2)
410
return principal.FindFirstValue(Options.
ClaimsIdentity
.UserNameClaimType);
422
return principal.FindFirstValue(Options.
ClaimsIdentity
.UserIdClaimType);