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