66 references to ClaimTypes
Aspire.Dashboard (4)
Authentication\UnsecuredAuthenticationHandler.cs (1)
21[new Claim(ClaimTypes.NameIdentifier, "Local"), new Claim(FrontendAuthorizationDefaults.UnsecuredClaimName, bool.TrueString)],
DashboardWebApplication.cs (2)
770new Claim(ClaimTypes.NameIdentifier, 773new Claim(ClaimTypes.Name,
Model\ValidateTokenMiddleware.cs (1)
94[new Claim(ClaimTypes.NameIdentifier, "Local")],
dotnet-user-jwts (1)
Helpers\JwtIssuer.cs (1)
41identity.AddClaims(rolesToAdd.Select(r => new Claim(ClaimTypes.Role, r)));
Microsoft.AspNetCore.Antiforgery (2)
Internal\DefaultClaimUidExtractor.cs (2)
60claim => string.Equals(ClaimTypes.NameIdentifier, claim.Type, StringComparison.Ordinal)); 72claim => string.Equals(ClaimTypes.Upn, claim.Type, StringComparison.Ordinal));
Microsoft.AspNetCore.Components.Authorization (1)
ClaimData.cs (1)
37/// Gets the claim type of the claim. <seealso cref="ClaimTypes"/>.
Microsoft.AspNetCore.Http.Connections (2)
Internal\HttpConnectionDispatcher.cs (2)
646var originalName = connection.User.FindFirst(ClaimTypes.NameIdentifier)?.Value; 647var newName = connection.HttpContext?.User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
Microsoft.AspNetCore.Identity (10)
SignInManager.cs (10)
210var authenticationMethod = auth.Principal?.FindFirst(ClaimTypes.AuthenticationMethod); 255additionalClaims.Add(new Claim(ClaimTypes.AuthenticationMethod, authenticationMethod)); 755return (result?.Principal != null && result.Principal.FindFirstValue(ClaimTypes.Name) == userId); 857claims.Add(new Claim(ClaimTypes.AuthenticationMethod, twoFactorInfo.LoginProvider)); 1108var providerKey = auth.Principal.FindFirstValue(ClaimTypes.NameIdentifier) ?? auth.Principal.FindFirstValue("sub"); 1180identity.AddClaim(new Claim(ClaimTypes.Name, userId)); 1183identity.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, loginProvider)); 1192rememberBrowserIdentity.AddClaim(new Claim(ClaimTypes.Name, userId)); 1275var userId = result.Principal.FindFirstValue(ClaimTypes.Name); 1290LoginProvider = result.Principal.FindFirstValue(ClaimTypes.AuthenticationMethod),
Microsoft.AspNetCore.SignalR.Core (1)
DefaultUserIdProvider.cs (1)
17return connection.User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
Microsoft.Extensions.Identity.Core (9)
ClaimsIdentityOptions.cs (8)
14/// Gets or sets the ClaimType used for a Role claim. Defaults to <see cref="ClaimTypes.Role"/>. 16public string RoleClaimType { get; set; } = ClaimTypes.Role; 19/// Gets or sets the ClaimType used for the user name claim. Defaults to <see cref="ClaimTypes.Name"/>. 21public string UserNameClaimType { get; set; } = ClaimTypes.Name; 24/// Gets or sets the ClaimType used for the user identifier claim. Defaults to <see cref="ClaimTypes.NameIdentifier"/>. 26public string UserIdClaimType { get; set; } = ClaimTypes.NameIdentifier; 29/// Gets or sets the ClaimType used for the user email claim. Defaults to <see cref="ClaimTypes.Email"/>. 31public string EmailClaimType { get; set; } = ClaimTypes.Email;
UserManager.cs (1)
442/// <remarks>The User ID claim is identified by <see cref="ClaimTypes.NameIdentifier"/>.</remarks>
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
854[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimTypes))]
netstandard (1)
netstandard.cs (1)
1838[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimTypes))]
System.Security.Claims (8)
System\Security\Claims\Claim.cs (6)
154/// <seealso cref="ClaimTypes"/> 174/// <seealso cref="ClaimTypes"/> 194/// <seealso cref="ClaimTypes"/> 214/// <seealso cref="ClaimTypes"/> 232/// <seealso cref="ClaimTypes"/> 356/// <seealso cref="ClaimTypes"/>.
System\Security\Claims\ClaimsIdentity.cs (2)
44public const string DefaultNameClaimType = ClaimTypes.Name; 45public const string DefaultRoleClaimType = ClaimTypes.Role;
System.Security.Principal.Windows (26)
System\Security\Principal\WindowsIdentity.cs (26)
104: base(null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid) 112: base(null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid) 118: base(null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid) 131: base(null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid) 1069AddTokenClaims(_userClaims, TokenInformationClass.TokenUserClaimAttributes, ClaimTypes.WindowsUserClaim); 1072AddTokenClaims(_deviceClaims, TokenInformationClass.TokenDeviceClaimAttributes, ClaimTypes.WindowsDeviceClaim); 1117claim = new Claim(ClaimTypes.PrimaryGroupSid, groupSid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); 1118claim.Properties.Add(ClaimTypes.WindowsSubAuthority, groupSid.IdentifierAuthority.ToString()); 1123claim = new Claim(ClaimTypes.GroupSid, groupSid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); 1124claim.Properties.Add(ClaimTypes.WindowsSubAuthority, groupSid.IdentifierAuthority.ToString()); 1131claim = new Claim(ClaimTypes.DenyOnlyPrimaryGroupSid, groupSid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); 1132claim.Properties.Add(ClaimTypes.WindowsSubAuthority, groupSid.IdentifierAuthority.ToString()); 1137claim = new Claim(ClaimTypes.DenyOnlySid, groupSid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); 1138claim.Properties.Add(ClaimTypes.WindowsSubAuthority, groupSid.IdentifierAuthority.ToString()); 1170claim = new Claim(ClaimTypes.PrimarySid, sid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); 1171claim.Properties.Add(ClaimTypes.WindowsSubAuthority, sid.IdentifierAuthority.ToString()); 1176claim = new Claim(ClaimTypes.DenyOnlyPrimarySid, sid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); 1177claim.Properties.Add(ClaimTypes.WindowsSubAuthority, sid.IdentifierAuthority.ToString()); 1217claimType = ClaimTypes.WindowsDeviceGroup; 1219claim.Properties.Add(ClaimTypes.WindowsSubAuthority, groupSid.IdentifierAuthority.ToString()); 1225claimType = ClaimTypes.DenyOnlyWindowsDeviceGroup; 1227claim.Properties.Add(ClaimTypes.WindowsSubAuthority, groupSid.IdentifierAuthority.ToString());