144 references to ClaimTypes
mscorlib (32)
system\security\claims\Claim.cs (6)
105/// <seealso cref="ClaimTypes"/> 125/// <seealso cref="ClaimTypes"/> 145/// <seealso cref="ClaimTypes"/> 165/// <seealso cref="ClaimTypes"/> 183/// <seealso cref="ClaimTypes"/> 367/// <seealso cref="ClaimTypes"/>.
system\security\claims\ClaimsIdentity.cs (2)
70public const string DefaultNameClaimType = ClaimTypes.Name; 72public const string DefaultRoleClaimType = ClaimTypes.Role;
system\security\principal\windowsidentity.cs (24)
122: base( null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid ) {} 158: base(null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid) 201: base( null, null, null, ClaimTypes.Name, ClaimTypes.GroupSid ) 1304AddTokenClaims(m_userClaims, TokenInformationClass.TokenUserClaimAttributes, ClaimTypes.WindowsUserClaim); 1307AddTokenClaims(m_deviceClaims, TokenInformationClass.TokenDeviceClaimAttributes, ClaimTypes.WindowsDeviceClaim); 1344claimType = ClaimTypes.WindowsDeviceGroup; 1345Claim claim = new Claim(claimType, groupSid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture)); 1351claimType = ClaimTypes.DenyOnlyWindowsDeviceGroup; 1352Claim claim = new Claim(claimType, groupSid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture)); 1403instanceClaims.Add(new Claim(ClaimTypes.PrimaryGroupSid, groupSid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture))); 1407instanceClaims.Add(new Claim(ClaimTypes.GroupSid, groupSid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture))); 1414instanceClaims.Add(new Claim(ClaimTypes.DenyOnlyPrimaryGroupSid, groupSid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture))); 1418instanceClaims.Add(new Claim(ClaimTypes.DenyOnlySid, groupSid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture))); 1452instanceClaims.Add(new Claim(ClaimTypes.PrimarySid, sid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(sid.IdentifierAuthority, CultureInfo.InvariantCulture))); 1456instanceClaims.Add(new Claim(ClaimTypes.DenyOnlyPrimarySid, sid.Value, ClaimValueTypes.String, m_issuerName, m_issuerName, this, ClaimTypes.WindowsSubAuthority, Convert.ToString(sid.IdentifierAuthority, CultureInfo.InvariantCulture)));
System.IdentityModel (108)
System\IdentityModel\Claims\AuthorizationContext.cs (2)
44_resource.Add( new System.Security.Claims.Claim( ClaimTypes.Name, resource ) ); 47_action.Add( new System.Security.Claims.Claim( ClaimTypes.Name, action ) );
System\IdentityModel\Claims\ClaimsConversionHelper.cs (14)
118if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Sid)) 122claimType = ClaimTypes.PrimarySid; 126claimType = ClaimTypes.GroupSid; 139if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Sid) && claim.Resource is SecurityIdentifier) 143_type = ClaimTypes.PrimarySid; 147_type = ClaimTypes.GroupSid; 151else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Email) && claim.Resource is MailAddress) 156else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Thumbprint) && claim.Resource is byte[]) 162else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Hash) && claim.Resource is byte[]) 168else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.NameIdentifier) && claim.Resource is SamlNameIdentifierClaimResource) 183else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.X500DistinguishedName) && claim.Resource is X500DistinguishedName) 189else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Uri) && claim.Resource is Uri) 194else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.Rsa) && claim.Resource is RSA) 200else if (StringComparer.Ordinal.Equals(claim.ClaimType, ClaimTypes.DenyOnlySid) && claim.Resource is SecurityIdentifier)
System\IdentityModel\Claims\ClaimsHelper.cs (1)
59if (StringComparer.Ordinal.Equals(ClaimTypes.Upn, claim.Type))
System\IdentityModel\Metadata\DisplayClaim.cs (32)
32map.Add(ClaimTypes.Country, SR.GetString(SR.CountryText)); 33map.Add(ClaimTypes.DateOfBirth, SR.GetString(SR.DateOfBirthText)); 34map.Add(ClaimTypes.Email, SR.GetString(SR.EmailAddressText)); 35map.Add(ClaimTypes.Gender, SR.GetString(SR.GenderText)); 36map.Add(ClaimTypes.GivenName, SR.GetString(SR.GivenNameText)); 37map.Add(ClaimTypes.HomePhone, SR.GetString(SR.HomePhoneText)); 38map.Add(ClaimTypes.Locality, SR.GetString(SR.LocalityText)); 39map.Add(ClaimTypes.MobilePhone, SR.GetString(SR.MobilePhoneText)); 40map.Add(ClaimTypes.Name, SR.GetString(SR.NameText)); 41map.Add(ClaimTypes.OtherPhone, SR.GetString(SR.OtherPhoneText)); 42map.Add(ClaimTypes.PostalCode, SR.GetString(SR.PostalCodeText)); 44map.Add(ClaimTypes.StateOrProvince, SR.GetString(SR.StateOrProvinceText)); 45map.Add(ClaimTypes.StreetAddress, SR.GetString(SR.StreetAddressText)); 46map.Add(ClaimTypes.Surname, SR.GetString(SR.SurnameText)); 47map.Add(ClaimTypes.Webpage, SR.GetString(SR.WebPageText)); 48map.Add(ClaimTypes.Role, SR.GetString(SR.RoleText)); 58map.Add(ClaimTypes.Country, SR.GetString(SR.CountryDescription)); 59map.Add(ClaimTypes.DateOfBirth, SR.GetString(SR.DateOfBirthDescription)); 60map.Add(ClaimTypes.Email, SR.GetString(SR.EmailAddressDescription)); 61map.Add(ClaimTypes.Gender, SR.GetString(SR.GenderDescription)); 62map.Add(ClaimTypes.GivenName, SR.GetString(SR.GivenNameDescription)); 63map.Add(ClaimTypes.HomePhone, SR.GetString(SR.HomePhoneDescription)); 64map.Add(ClaimTypes.Locality, SR.GetString(SR.LocalityDescription)); 65map.Add(ClaimTypes.MobilePhone, SR.GetString(SR.MobilePhoneDescription)); 66map.Add(ClaimTypes.Name, SR.GetString(SR.NameDescription)); 67map.Add(ClaimTypes.OtherPhone, SR.GetString(SR.OtherPhoneDescription)); 68map.Add(ClaimTypes.PostalCode, SR.GetString(SR.PostalCodeDescription)); 70map.Add(ClaimTypes.StateOrProvince, SR.GetString(SR.StateOrProvinceDescription)); 71map.Add(ClaimTypes.StreetAddress, SR.GetString(SR.StreetAddressDescription)); 72map.Add(ClaimTypes.Surname, SR.GetString(SR.SurnameDescription)); 73map.Add(ClaimTypes.Webpage, SR.GetString(SR.WebPageDescription)); 74map.Add(ClaimTypes.Role, SR.GetString(SR.RoleDescription));
System\IdentityModel\Tokens\AuthorizationPolicy.cs (1)
278else if (identity.FindFirst(ClaimTypes.Rsa) != null)
System\IdentityModel\Tokens\KerberosSecurityTokenHandler.cs (2)
98wi.AddClaim(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(DateTime.UtcNow, DateTimeFormats.Generated), ClaimValueTypes.DateTime)); 99wi.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, AuthenticationMethods.Windows, ClaimValueTypes.String));
System\IdentityModel\Tokens\RsaSecurityTokenHandler.cs (3)
169ClaimsIdentity identity = new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Rsa, rsaToken.Rsa.ToXmlString(false), ClaimValueTypes.RsaKeyValue, ClaimsIdentity.DefaultIssuer) }, AuthenticationTypes.Signature); 171identity.AddClaim(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(DateTime.UtcNow, DateTimeFormats.Generated), ClaimValueTypes.DateTime)); 172identity.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, AuthenticationMethods.Signature));
System\IdentityModel\Tokens\Saml2SecurityTokenHandler.cs (12)
1139if (claim != null && claim.Type != ClaimTypes.NameIdentifier) 1143case ClaimTypes.AuthenticationInstant: 1144case ClaimTypes.AuthenticationMethod: 1235attributes.Add(this.CreateAttribute(new Claim(ClaimTypes.Actor, this.CreateXmlStringFromAttributes(collectedAttributes), ClaimValueTypes.String), tokenDescriptor)); 1342IEnumerable<Claim> claimCollection = from c in tokenDescriptor.Subject.Claims where c.Type == ClaimTypes.AuthenticationMethod select c; 1351claimCollection = from c in tokenDescriptor.Subject.Claims where c.Type == ClaimTypes.AuthenticationInstant select c; 1427if (claim.Type == ClaimTypes.NameIdentifier) 1784Claim claim = new Claim(ClaimTypes.NameIdentifier, nameId.Value, ClaimValueTypes.String, issuer); 1830if (StringComparer.Ordinal.Equals(attribute.Name, ClaimTypes.Actor)) 1906if (innerAttribute.Name == ClaimTypes.Actor) 1979ClaimTypes.AuthenticationMethod, 1985subject.AddClaim(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(statement.AuthenticationInstant.ToUniversalTime(), DateTimeFormats.Generated), ClaimValueTypes.DateTime, issuer));
System\IdentityModel\Tokens\SamlSecurityTokenHandler.cs (16)
25using ClaimTypes = System.Security.Claims.ClaimTypes; 359where c.Type == ClaimTypes.AuthenticationMethod 370where c.Type == ClaimTypes.AuthenticationInstant 437if (claim != null && claim.Type != ClaimTypes.NameIdentifier) 445case ClaimTypes.AuthenticationInstant: 446case ClaimTypes.AuthenticationMethod: 540attributes.Add(CreateAttribute(new Claim(ClaimTypes.Actor, CreateXmlStringFromAttributes(collectedAttributes), ClaimValueTypes.String), tokenDescriptor)); 570if (claim.Type == ClaimTypes.NameIdentifier) 1278if (claimType == ClaimTypes.Actor) 1292if (StringComparer.Ordinal.Equals(ClaimTypes.NameIdentifier, claimType) && GetClaim(subject, ClaimTypes.NameIdentifier) != null) 1354Claim nameIdentifierClaim = GetClaim(subject, ClaimTypes.NameIdentifier); 1364Claim claim = new Claim(ClaimTypes.NameIdentifier, samlSubject.Name, ClaimValueTypes.String, issuer); 1406subject.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, NormalizeAuthenticationType(samlStatement.AuthenticationMethod), ClaimValueTypes.String, issuer)); 1407subject.AddClaim(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(samlStatement.AuthenticationInstant.ToUniversalTime(), DateTimeFormats.Generated), ClaimValueTypes.DateTime, issuer)); 1457if (claimType == ClaimTypes.Actor)
System\IdentityModel\Tokens\SamlSecurityTokenRequirement.cs (1)
32string _roleClaimType = ClaimTypes.Role;
System\IdentityModel\Tokens\SecurityTokenDescriptor.cs (2)
247new Claim(ClaimTypes.AuthenticationMethod, authType, ClaimValueTypes.String)); 250new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(time.ToUniversalTime(), DateTimeFormats.Generated), ClaimValueTypes.DateTime));
System\IdentityModel\Tokens\SessionSecurityToken.cs (7)
24using ClaimTypes = System.Security.Claims.ClaimTypes; 1331if (c.Type == ClaimTypes.GroupSid 1332|| c.Type == ClaimTypes.PrimaryGroupSid 1333|| c.Type == ClaimTypes.PrimarySid 1334|| c.Type == ClaimTypes.DenyOnlyPrimaryGroupSid 1335|| c.Type == ClaimTypes.DenyOnlyPrimarySid 1336|| c.Type == ClaimTypes.Name && c.Issuer == ClaimsIdentity.DefaultIssuer && c.ValueType == ClaimValueTypes.String)
System\IdentityModel\Tokens\WindowsUserNameSecurityTokenHandler.cs (2)
104windowsIdentity.AddClaim(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(DateTime.UtcNow, DateTimeFormats.Generated), ClaimValueTypes.DateTime)); 105windowsIdentity.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, AuthenticationMethods.Password));
System\IdentityModel\Tokens\X509SecurityTokenHandler.cs (3)
545identity.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, AuthenticationMethods.X509)); 577windowsIdentity.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, AuthenticationMethods.X509)); 586identity.AddClaim(new Claim(ClaimTypes.AuthenticationInstant, XmlConvert.ToString(DateTime.UtcNow, DateTimeFormats.Generated), ClaimValueTypes.DateTime));
System\IdentityModel\X509Util.cs (10)
193claimsCollection.Add(new Claim(ClaimTypes.Thumbprint, thumbprint, ClaimValueTypes.Base64Binary, issuer)); 198claimsCollection.Add(new Claim(ClaimTypes.X500DistinguishedName, value, ClaimValueTypes.String, issuer)); 204claimsCollection.Add(new Claim(ClaimTypes.Dns, value, ClaimValueTypes.String, issuer)); 210claimsCollection.Add(new Claim(ClaimTypes.Name, value, ClaimValueTypes.String, issuer)); 216claimsCollection.Add(new Claim(ClaimTypes.Email, value, ClaimValueTypes.String, issuer)); 222claimsCollection.Add(new Claim(ClaimTypes.Upn, value, ClaimValueTypes.String, issuer)); 228claimsCollection.Add(new Claim(ClaimTypes.Uri, value, ClaimValueTypes.String, issuer)); 242claimsCollection.Add(new Claim(ClaimTypes.Rsa, rsa.ToXmlString(false), ClaimValueTypes.RsaKeyValue, issuer)); 256claimsCollection.Add(new Claim(ClaimTypes.Dsa, dsa.ToXmlString(false), ClaimValueTypes.DsaKeyValue, issuer)); 262claimsCollection.Add(new Claim(ClaimTypes.SerialNumber, value, ClaimValueTypes.String, issuer));
System.ServiceModel (4)
System\ServiceModel\Security\IdentityModelServiceAuthorizationManager.cs (4)
564claimsIdentity.Claims.FirstOrDefault(claim => claim.Type == System.Security.Claims.ClaimTypes.AuthenticationMethod); 571System.Security.Claims.ClaimTypes.AuthenticationMethod, authenticationMethod)); 581claimsIdentity.Claims.FirstOrDefault(claim => claim.Type == System.Security.Claims.ClaimTypes.AuthenticationInstant); 588System.Security.Claims.ClaimTypes.AuthenticationInstant, authenticationInstant, ClaimValueTypes.DateTime,