454 references to Saml2Constants
System.IdentityModel (454)
System\IdentityModel\Claims\AuthenticationTypeMaps.cs (12)
46
new Mapping( AuthenticationMethods.Kerberos,
Saml2Constants
.AuthenticationContextClasses.KerberosString ),
47
new Mapping( AuthenticationMethods.Password,
Saml2Constants
.AuthenticationContextClasses.PasswordString ),
48
new Mapping( AuthenticationMethods.Pgp,
Saml2Constants
.AuthenticationContextClasses.PgpString ),
49
new Mapping( AuthenticationMethods.SecureRemotePassword,
Saml2Constants
.AuthenticationContextClasses.SecureRemotePasswordString ),
50
new Mapping( AuthenticationMethods.Signature,
Saml2Constants
.AuthenticationContextClasses.XmlDsigString ),
51
new Mapping( AuthenticationMethods.Spki,
Saml2Constants
.AuthenticationContextClasses.SpkiString ),
52
new Mapping( AuthenticationMethods.Smartcard,
Saml2Constants
.AuthenticationContextClasses.SmartcardString ),
53
new Mapping( AuthenticationMethods.SmartcardPki,
Saml2Constants
.AuthenticationContextClasses.SmartcardPkiString ),
54
new Mapping( AuthenticationMethods.TlsClient,
Saml2Constants
.AuthenticationContextClasses.TlsClientString ),
55
new Mapping( AuthenticationMethods.Unspecified,
Saml2Constants
.AuthenticationContextClasses.UnspecifiedString ),
56
new Mapping( AuthenticationMethods.X509,
Saml2Constants
.AuthenticationContextClasses.X509String ),
57
new Mapping( AuthenticationMethods.Windows,
Saml2Constants
.AuthenticationContextClasses.WindowsString ),
System\IdentityModel\Metadata\MetadataSerializer.cs (24)
855
else if (reader.IsStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace))
3177
if (!reader.IsStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace))
3179
reader.ReadStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace);
3191
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AttributeType,
Saml2Constants
.Namespace);
3194
value = reader.GetAttribute(
Saml2Constants
.Attributes.Name);
3197
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Name,
Saml2Constants
.Elements.Attribute));
3203
value = reader.GetAttribute(
Saml2Constants
.Attributes.NameFormat);
3208
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0011,
Saml2Constants
.Attributes.Namespace,
Saml2Constants
.Elements.Action));
3215
attribute.FriendlyName = reader.GetAttribute(
Saml2Constants
.Attributes.FriendlyName);
3221
while (reader.IsStartElement(
Saml2Constants
.Elements.AttributeValue,
Saml2Constants
.Namespace))
3291
writer.WriteStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace);
3294
writer.WriteAttributeString(
Saml2Constants
.Attributes.Name, data.Name);
3299
writer.WriteAttributeString(
Saml2Constants
.Attributes.NameFormat, data.NameFormat.AbsoluteUri);
3305
writer.WriteAttributeString(
Saml2Constants
.Attributes.FriendlyName, data.FriendlyName);
3311
writer.WriteStartElement(
Saml2Constants
.Elements.AttributeValue,
Saml2Constants
.Namespace);
System\IdentityModel\Tokens\Saml2SecurityTokenHandler.cs (417)
28
using SAML2 = System.IdentityModel.Tokens.
Saml2Constants
;
469
return reader.IsStartElement(
SAML2
.Elements.Assertion,
SAML2
.Namespace)
470
|| reader.IsStartElement(
SAML2
.Elements.EncryptedAssertion,
SAML2
.Namespace);
747
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.EncryptedElementType,
Saml2Constants
.Namespace);
870
return reader.IsStartElement(
SAML2
.Elements.Assertion,
SAML2
.Namespace)
871
|| reader.IsStartElement(
SAML2
.Elements.EncryptedAssertion,
SAML2
.Namespace);
1480
subjectConfirmation = new Saml2SubjectConfirmation(
Saml2Constants
.ConfirmationMethods.Bearer);
1484
subjectConfirmation = new Saml2SubjectConfirmation(
Saml2Constants
.ConfirmationMethods.HolderOfKey, new Saml2SubjectConfirmationData());
1755
/// <param name="saml2AuthenticationContextClassReference">A string representing the <see cref="
Saml2Constants
.AuthenticationContextClasses"/></param>
2169
if (
Saml2Constants
.ConfirmationMethods.Bearer == subjectConfirmation.Method)
2180
else if (
Saml2Constants
.ConfirmationMethods.HolderOfKey == subjectConfirmation.Method)
2305
if (reader.IsStartElement(
Saml2Constants
.Elements.NameID,
Saml2Constants
.Namespace))
2309
else if (reader.IsStartElement(
Saml2Constants
.Elements.EncryptedID,
Saml2Constants
.Namespace))
2313
else if (reader.IsStartElement(
Saml2Constants
.Elements.BaseID,
Saml2Constants
.Namespace))
2321
|| XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.BaseIDAbstractType,
Saml2Constants
.Namespace))
2327
if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.NameIDType,
Saml2Constants
.Namespace))
2354
if (!reader.IsStartElement(
Saml2Constants
.Elements.Action,
Saml2Constants
.Namespace))
2356
reader.ReadStartElement(
Saml2Constants
.Elements.Action,
Saml2Constants
.Namespace);
2362
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID3061,
Saml2Constants
.Elements.Action,
Saml2Constants
.Namespace));
2374
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.ActionType,
Saml2Constants
.Namespace);
2377
attributeValue = reader.GetAttribute(
Saml2Constants
.Attributes.Namespace);
2380
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Namespace,
Saml2Constants
.Elements.Action));
2385
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0011,
Saml2Constants
.Attributes.Namespace,
Saml2Constants
.Elements.Action));
2438
writer.WriteStartElement(
Saml2Constants
.Elements.Action,
Saml2Constants
.Namespace);
2441
writer.WriteAttributeString(
Saml2Constants
.Attributes.Namespace, data.Namespace.AbsoluteUri);
2472
if (!reader.IsStartElement(
Saml2Constants
.Elements.Advice,
Saml2Constants
.Namespace))
2474
reader.ReadStartElement(
Saml2Constants
.Elements.Advice,
Saml2Constants
.Namespace);
2485
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AdviceType,
Saml2Constants
.Namespace);
2494
if (reader.IsStartElement(
Saml2Constants
.Elements.AssertionIDRef,
Saml2Constants
.Namespace))
2498
else if (reader.IsStartElement(
Saml2Constants
.Elements.AssertionURIRef,
Saml2Constants
.Namespace))
2502
else if (reader.IsStartElement(
Saml2Constants
.Elements.Assertion,
Saml2Constants
.Namespace))
2506
else if (reader.IsStartElement(
Saml2Constants
.Elements.EncryptedAssertion,
Saml2Constants
.Namespace))
2557
writer.WriteStartElement(
Saml2Constants
.Elements.Advice,
Saml2Constants
.Namespace);
2562
writer.WriteElementString(
Saml2Constants
.Elements.AssertionIDRef,
Saml2Constants
.Namespace, id.Value);
2568
writer.WriteElementString(
Saml2Constants
.Elements.AssertionURIRef,
Saml2Constants
.Namespace, uri.AbsoluteUri);
2614
if (reader.IsStartElement(
Saml2Constants
.Elements.EncryptedAssertion,
Saml2Constants
.Namespace))
2628
if (!plaintextReader.IsStartElement(
Saml2Constants
.Elements.Assertion,
Saml2Constants
.Namespace))
2630
plaintextReader.ReadStartElement(
Saml2Constants
.Elements.Assertion,
Saml2Constants
.Namespace);
2654
XmlUtil.ValidateXsiType(realReader,
Saml2Constants
.Types.AssertionType,
Saml2Constants
.Namespace);
2657
string version = realReader.GetAttribute(
Saml2Constants
.Attributes.Version);
2660
throw DiagnosticUtility.ThrowHelperXml(realReader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Version,
Saml2Constants
.Elements.Assertion));
2669
value = realReader.GetAttribute(
Saml2Constants
.Attributes.ID);
2672
throw DiagnosticUtility.ThrowHelperXml(realReader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.ID,
Saml2Constants
.Elements.Assertion));
2678
value = realReader.GetAttribute(
Saml2Constants
.Attributes.IssueInstant);
2681
throw DiagnosticUtility.ThrowHelperXml(realReader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.IssueInstant,
Saml2Constants
.Elements.Assertion));
2696
if (realReader.IsStartElement(
Saml2Constants
.Elements.Subject,
Saml2Constants
.Namespace))
2702
if (realReader.IsStartElement(
Saml2Constants
.Elements.Conditions,
Saml2Constants
.Namespace))
2708
if (realReader.IsStartElement(
Saml2Constants
.Elements.Advice,
Saml2Constants
.Namespace))
2718
if (realReader.IsStartElement(
Saml2Constants
.Elements.Statement,
Saml2Constants
.Namespace))
2722
else if (realReader.IsStartElement(
Saml2Constants
.Elements.AttributeStatement,
Saml2Constants
.Namespace))
2726
else if (realReader.IsStartElement(
Saml2Constants
.Elements.AuthnStatement,
Saml2Constants
.Namespace))
2730
else if (realReader.IsStartElement(
Saml2Constants
.Elements.AuthzDecisionStatement,
Saml2Constants
.Namespace))
2871
writer.WriteStartElement(
Saml2Constants
.Elements.Assertion,
Saml2Constants
.Namespace);
2874
writer.WriteAttributeString(
Saml2Constants
.Attributes.ID, data.Id.Value);
2877
writer.WriteAttributeString(
Saml2Constants
.Attributes.IssueInstant, XmlConvert.ToString(data.IssueInstant.ToUniversalTime(), DateTimeFormats.Generated));
2880
writer.WriteAttributeString(
Saml2Constants
.Attributes.Version, data.Version);
2941
originalWriter.WriteStartElement(
Saml2Constants
.Elements.EncryptedAssertion,
Saml2Constants
.Namespace);
2971
if (!reader.IsStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace))
2973
reader.ReadStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace);
2985
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AttributeType,
Saml2Constants
.Namespace);
2988
value = reader.GetAttribute(
Saml2Constants
.Attributes.Name);
2991
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Name,
Saml2Constants
.Elements.Attribute));
2997
value = reader.GetAttribute(
Saml2Constants
.Attributes.NameFormat);
3002
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0011,
Saml2Constants
.Attributes.Namespace,
Saml2Constants
.Elements.Action));
3009
attribute.FriendlyName = reader.GetAttribute(
Saml2Constants
.Attributes.FriendlyName);
3015
string originalIssuer = reader.GetAttribute(
Saml2Constants
.Attributes.OriginalIssuer, ClaimType2009Namespace);
3019
originalIssuer = reader.GetAttribute(
Saml2Constants
.Attributes.OriginalIssuer, ProductConstants.NamespaceUri);
3033
while (reader.IsStartElement(
Saml2Constants
.Elements.AttributeValue,
Saml2Constants
.Namespace))
3154
reader.ReadStartElement(
Saml2Constants
.Elements.AttributeValue,
Saml2Constants
.Namespace);
3199
writer.WriteStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace);
3202
writer.WriteAttributeString(
Saml2Constants
.Attributes.Name, data.Name);
3207
writer.WriteAttributeString(
Saml2Constants
.Attributes.NameFormat, data.NameFormat.AbsoluteUri);
3213
writer.WriteAttributeString(
Saml2Constants
.Attributes.FriendlyName, data.FriendlyName);
3219
writer.WriteAttributeString(
Saml2Constants
.Attributes.OriginalIssuer, ClaimType2009Namespace, data.OriginalIssuer);
3236
writer.WriteStartElement(
Saml2Constants
.Elements.AttributeValue,
Saml2Constants
.Namespace);
3294
if (reader.IsStartElement(
Saml2Constants
.Elements.Statement,
Saml2Constants
.Namespace))
3298
else if (!reader.IsStartElement(
Saml2Constants
.Elements.AttributeStatement,
Saml2Constants
.Namespace))
3300
reader.ReadStartElement(
Saml2Constants
.Elements.AttributeStatement,
Saml2Constants
.Namespace);
3311
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AttributeStatementType,
Saml2Constants
.Namespace, isStatementElement);
3316
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID3061,
Saml2Constants
.Elements.AttributeStatement,
Saml2Constants
.Namespace));
3326
if (reader.IsStartElement(
Saml2Constants
.Elements.EncryptedAttribute,
Saml2Constants
.Namespace))
3330
else if (reader.IsStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace))
3343
reader.ReadStartElement(
Saml2Constants
.Elements.Attribute,
Saml2Constants
.Namespace);
3390
writer.WriteStartElement(
Saml2Constants
.Elements.AttributeStatement,
Saml2Constants
.Namespace);
3418
if (reader.IsStartElement(
Saml2Constants
.Elements.Condition,
Saml2Constants
.Namespace))
3422
else if (!reader.IsStartElement(
Saml2Constants
.Elements.AudienceRestriction,
Saml2Constants
.Namespace))
3424
reader.ReadStartElement(
Saml2Constants
.Elements.AudienceRestriction,
Saml2Constants
.Namespace);
3435
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AudienceRestrictionType,
Saml2Constants
.Namespace, isConditionElement);
3447
if (!reader.IsStartElement(
Saml2Constants
.Elements.Audience,
Saml2Constants
.Namespace))
3449
reader.ReadStartElement(
Saml2Constants
.Elements.Audience,
Saml2Constants
.Namespace);
3456
while (reader.IsStartElement(
Saml2Constants
.Elements.Audience,
Saml2Constants
.Namespace))
3506
writer.WriteStartElement(
Saml2Constants
.Elements.AudienceRestriction,
Saml2Constants
.Namespace);
3512
writer.WriteElementString(
Saml2Constants
.Elements.Audience,
Saml2Constants
.Namespace, audience.OriginalString);
3537
if (!reader.IsStartElement(
Saml2Constants
.Elements.AuthnContext,
Saml2Constants
.Namespace))
3539
reader.ReadStartElement(
Saml2Constants
.Elements.AuthnContext,
Saml2Constants
.Namespace);
3547
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID3061,
Saml2Constants
.Elements.AuthnContext,
Saml2Constants
.Namespace));
3553
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AuthnContextType,
Saml2Constants
.Namespace);
3565
if (reader.IsStartElement(
Saml2Constants
.Elements.AuthnContextClassRef,
Saml2Constants
.Namespace))
3571
if (reader.IsStartElement(
Saml2Constants
.Elements.AuthnContextDecl,
Saml2Constants
.Namespace))
3578
if (reader.IsStartElement(
Saml2Constants
.Elements.AuthnContextDeclRef,
Saml2Constants
.Namespace))
3584
reader.ReadStartElement(
Saml2Constants
.Elements.AuthnContextDeclRef,
Saml2Constants
.Namespace);
3591
while (reader.IsStartElement(
Saml2Constants
.Elements.AuthenticatingAuthority,
Saml2Constants
.Namespace))
3642
writer.WriteStartElement(
Saml2Constants
.Elements.AuthnContext,
Saml2Constants
.Namespace);
3647
writer.WriteElementString(
Saml2Constants
.Elements.AuthnContextClassRef,
Saml2Constants
.Namespace, data.ClassReference.AbsoluteUri);
3653
writer.WriteElementString(
Saml2Constants
.Elements.AuthnContextDeclRef,
Saml2Constants
.Namespace, data.DeclarationReference.AbsoluteUri);
3659
writer.WriteElementString(
Saml2Constants
.Elements.AuthenticatingAuthority,
Saml2Constants
.Namespace, authority.AbsoluteUri);
3681
if (reader.IsStartElement(
Saml2Constants
.Elements.Statement,
Saml2Constants
.Namespace))
3685
else if (!reader.IsStartElement(
Saml2Constants
.Elements.AuthnStatement,
Saml2Constants
.Namespace))
3687
reader.ReadStartElement(
Saml2Constants
.Elements.AuthnStatement,
Saml2Constants
.Namespace);
3707
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AuthnStatementType,
Saml2Constants
.Namespace, isStatementElement);
3712
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID3061,
Saml2Constants
.Elements.AuthnStatement,
Saml2Constants
.Namespace));
3716
value = reader.GetAttribute(
Saml2Constants
.Attributes.AuthnInstant);
3719
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.AuthnInstant,
Saml2Constants
.Elements.AuthnStatement));
3725
sessionIndex = reader.GetAttribute(
Saml2Constants
.Attributes.SessionIndex);
3728
value = reader.GetAttribute(
Saml2Constants
.Attributes.SessionNotOnOrAfter);
3738
if (reader.IsStartElement(
Saml2Constants
.Elements.SubjectLocality,
Saml2Constants
.Namespace))
3791
writer.WriteStartElement(
Saml2Constants
.Elements.AuthnStatement,
Saml2Constants
.Namespace);
3794
writer.WriteAttributeString(
Saml2Constants
.Attributes.AuthnInstant, XmlConvert.ToString(data.AuthenticationInstant.ToUniversalTime(), DateTimeFormats.Generated));
3799
writer.WriteAttributeString(
Saml2Constants
.Attributes.SessionIndex, data.SessionIndex);
3805
writer.WriteAttributeString(
Saml2Constants
.Attributes.SessionNotOnOrAfter, XmlConvert.ToString(data.SessionNotOnOrAfter.Value.ToUniversalTime(), DateTimeFormats.Generated));
3837
if (reader.IsStartElement(
Saml2Constants
.Elements.Statement,
Saml2Constants
.Namespace))
3841
else if (!reader.IsStartElement(
Saml2Constants
.Elements.AuthzDecisionStatement,
Saml2Constants
.Namespace))
3843
reader.ReadStartElement(
Saml2Constants
.Elements.AuthzDecisionStatement,
Saml2Constants
.Namespace);
3860
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.AuthzDecisionStatementType,
Saml2Constants
.Namespace, isStatementElement);
3865
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID3061,
Saml2Constants
.Elements.AuthzDecisionStatement,
Saml2Constants
.Namespace));
3869
value = reader.GetAttribute(
Saml2Constants
.Attributes.Decision);
3872
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Decision,
Saml2Constants
.Elements.AuthzDecisionStatement));
3892
value = reader.GetAttribute(
Saml2Constants
.Attributes.Resource);
3895
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Resource,
Saml2Constants
.Elements.AuthzDecisionStatement));
3920
while (reader.IsStartElement(
Saml2Constants
.Elements.Action,
Saml2Constants
.Namespace));
3923
if (reader.IsStartElement(
Saml2Constants
.Elements.Evidence,
Saml2Constants
.Namespace))
3974
writer.WriteStartElement(
Saml2Constants
.Elements.AuthzDecisionStatement,
Saml2Constants
.Namespace);
3977
writer.WriteAttributeString(
Saml2Constants
.Attributes.Decision, data.Decision.ToString());
3981
writer.WriteAttributeString(
Saml2Constants
.Attributes.Resource, data.Resource.Equals(Saml2AuthorizationDecisionStatement.EmptyResource) ? data.Resource.ToString() : data.Resource.AbsoluteUri);
4016
if (!reader.IsStartElement(
Saml2Constants
.Elements.Conditions,
Saml2Constants
.Namespace))
4018
reader.ReadStartElement(
Saml2Constants
.Elements.Conditions,
Saml2Constants
.Namespace);
4031
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.ConditionsType,
Saml2Constants
.Namespace);
4034
value = reader.GetAttribute(
Saml2Constants
.Attributes.NotBefore);
4041
value = reader.GetAttribute(
Saml2Constants
.Attributes.NotOnOrAfter);
4055
if (reader.IsStartElement(
Saml2Constants
.Elements.Condition,
Saml2Constants
.Namespace))
4062
|| XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.ConditionAbstractType,
Saml2Constants
.Namespace))
4066
else if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.AudienceRestrictionType,
Saml2Constants
.Namespace))
4070
else if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.OneTimeUseType,
Saml2Constants
.Namespace))
4074
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4115,
Saml2Constants
.Elements.OneTimeUse));
4080
else if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.ProxyRestrictionType,
Saml2Constants
.Namespace))
4084
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4115,
Saml2Constants
.Elements.ProxyRestricton));
4095
else if (reader.IsStartElement(
Saml2Constants
.Elements.AudienceRestriction,
Saml2Constants
.Namespace))
4099
else if (reader.IsStartElement(
Saml2Constants
.Elements.OneTimeUse,
Saml2Constants
.Namespace))
4103
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4115,
Saml2Constants
.Elements.OneTimeUse));
4109
else if (reader.IsStartElement(
Saml2Constants
.Elements.ProxyRestricton,
Saml2Constants
.Namespace))
4113
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4115,
Saml2Constants
.Elements.ProxyRestricton));
4164
writer.WriteStartElement(
Saml2Constants
.Elements.Conditions,
Saml2Constants
.Namespace);
4169
writer.WriteAttributeString(
Saml2Constants
.Attributes.NotBefore, XmlConvert.ToString(data.NotBefore.Value.ToUniversalTime(), DateTimeFormats.Generated));
4175
writer.WriteAttributeString(
Saml2Constants
.Attributes.NotOnOrAfter, XmlConvert.ToString(data.NotOnOrAfter.Value.ToUniversalTime(), DateTimeFormats.Generated));
4187
writer.WriteStartElement(
Saml2Constants
.Elements.OneTimeUse,
Saml2Constants
.Namespace);
4214
if (!reader.IsStartElement(
Saml2Constants
.Elements.Evidence,
Saml2Constants
.Namespace))
4216
reader.ReadStartElement(
Saml2Constants
.Elements.Evidence,
Saml2Constants
.Namespace);
4222
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID3061,
Saml2Constants
.Elements.Evidence,
Saml2Constants
.Namespace));
4232
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.EvidenceType,
Saml2Constants
.Namespace);
4239
if (reader.IsStartElement(
Saml2Constants
.Elements.AssertionIDRef,
Saml2Constants
.Namespace))
4243
else if (reader.IsStartElement(
Saml2Constants
.Elements.AssertionURIRef,
Saml2Constants
.Namespace))
4247
else if (reader.IsStartElement(
Saml2Constants
.Elements.Assertion,
Saml2Constants
.Namespace))
4251
else if (reader.IsStartElement(
Saml2Constants
.Elements.EncryptedAssertion,
Saml2Constants
.Namespace))
4311
writer.WriteStartElement(
Saml2Constants
.Elements.Evidence,
Saml2Constants
.Namespace);
4316
writer.WriteElementString(
Saml2Constants
.Elements.AssertionIDRef,
Saml2Constants
.Namespace, id.Value);
4322
writer.WriteElementString(
Saml2Constants
.Elements.AssertionURIRef,
Saml2Constants
.Namespace, uri.AbsoluteUri);
4348
if (!reader.IsStartElement(
Saml2Constants
.Elements.Issuer,
Saml2Constants
.Namespace))
4350
reader.ReadStartElement(
Saml2Constants
.Elements.Issuer,
Saml2Constants
.Namespace);
4373
writer.WriteStartElement(
Saml2Constants
.Elements.Issuer,
Saml2Constants
.Namespace);
4492
if (!reader.IsStartElement(
Saml2Constants
.Elements.NameID,
Saml2Constants
.Namespace))
4494
reader.ReadStartElement(
Saml2Constants
.Elements.NameID,
Saml2Constants
.Namespace);
4539
plaintextWriter.WriteStartElement(
Saml2Constants
.Elements.NameID,
Saml2Constants
.Namespace);
4554
writer.WriteStartElement(
Saml2Constants
.Elements.EncryptedID,
Saml2Constants
.Namespace);
4575
writer.WriteStartElement(
Saml2Constants
.Elements.NameID,
Saml2Constants
.Namespace);
4599
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.NameIDType,
Saml2Constants
.Namespace);
4602
value = reader.GetAttribute(
Saml2Constants
.Attributes.Format);
4607
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0011,
Saml2Constants
.Attributes.Format,
Saml2Constants
.Elements.NameID));
4614
value = reader.GetAttribute(
Saml2Constants
.Attributes.NameQualifier);
4621
value = reader.GetAttribute(
Saml2Constants
.Attributes.SPNameQualifier);
4628
value = reader.GetAttribute(
Saml2Constants
.Attributes.SPProvidedID);
4640
StringComparer.Ordinal.Equals(nameIdentifier.Format.AbsoluteUri,
Saml2Constants
.NameIdentifierFormats.Entity.AbsoluteUri))
4644
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4262, nameIdentifier.Value,
Saml2Constants
.NameIdentifierFormats.Entity.AbsoluteUri));
4651
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4263, nameIdentifier.Value,
Saml2Constants
.NameIdentifierFormats.Entity.AbsoluteUri));
4690
if (!reader.IsStartElement(
Saml2Constants
.Elements.EncryptedID,
Saml2Constants
.Namespace))
4693
reader.ReadStartElement(
Saml2Constants
.Elements.EncryptedID,
Saml2Constants
.Namespace);
4734
writer.WriteAttributeString(
Saml2Constants
.Attributes.Format, data.Format.AbsoluteUri);
4740
writer.WriteAttributeString(
Saml2Constants
.Attributes.NameQualifier, data.NameQualifier);
4746
writer.WriteAttributeString(
Saml2Constants
.Attributes.SPNameQualifier, data.SPNameQualifier);
4752
writer.WriteAttributeString(
Saml2Constants
.Attributes.SPProvidedID, data.SPProvidedId);
4778
if (reader.IsStartElement(
Saml2Constants
.Elements.Condition,
Saml2Constants
.Namespace))
4782
else if (!reader.IsStartElement(
Saml2Constants
.Elements.ProxyRestricton,
Saml2Constants
.Namespace))
4784
reader.ReadStartElement(
Saml2Constants
.Elements.ProxyRestricton,
Saml2Constants
.Namespace);
4797
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.ProxyRestrictionType,
Saml2Constants
.Namespace, isConditionElement);
4800
value = reader.GetAttribute(
Saml2Constants
.Attributes.Count);
4811
while (reader.IsStartElement(
Saml2Constants
.Elements.Audience,
Saml2Constants
.Namespace))
4855
writer.WriteStartElement(
Saml2Constants
.Elements.ProxyRestricton,
Saml2Constants
.Namespace);
4860
writer.WriteAttributeString(
Saml2Constants
.Attributes.Count, XmlConvert.ToString(data.Count.Value));
4866
writer.WriteElementString(
Saml2Constants
.Elements.Audience, uri.AbsoluteUri);
4891
if (!reader.IsStartElement(
Saml2Constants
.Elements.Statement,
Saml2Constants
.Namespace))
4893
reader.ReadStartElement(
Saml2Constants
.Elements.Statement,
Saml2Constants
.Namespace);
4902
|| XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.StatementAbstractType,
Saml2Constants
.Namespace))
4908
if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.AttributeStatementType,
Saml2Constants
.Namespace))
4912
else if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.AuthnStatementType,
Saml2Constants
.Namespace))
4916
else if (XmlUtil.EqualsQName(declaredType,
Saml2Constants
.Types.AuthzDecisionStatementType,
Saml2Constants
.Namespace))
4992
if (!reader.IsStartElement(
Saml2Constants
.Elements.Subject,
Saml2Constants
.Namespace))
4994
reader.ReadStartElement(
Saml2Constants
.Elements.Subject,
Saml2Constants
.Namespace);
5009
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.SubjectType,
Saml2Constants
.Namespace);
5016
subject.NameId = this.ReadSubjectId(reader,
Saml2Constants
.Elements.Subject);
5019
while (reader.IsStartElement(
Saml2Constants
.Elements.SubjectConfirmation,
Saml2Constants
.Namespace))
5076
writer.WriteStartElement(
Saml2Constants
.Elements.Subject,
Saml2Constants
.Namespace);
5109
if (!reader.IsStartElement(
Saml2Constants
.Elements.SubjectConfirmation,
Saml2Constants
.Namespace))
5111
reader.ReadStartElement(
Saml2Constants
.Elements.SubjectConfirmation,
Saml2Constants
.Namespace);
5121
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.SubjectConfirmationType,
Saml2Constants
.Namespace);
5124
string method = reader.GetAttribute(
Saml2Constants
.Attributes.Method);
5127
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0001,
Saml2Constants
.Attributes.Method,
Saml2Constants
.Elements.SubjectConfirmation));
5132
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0011,
Saml2Constants
.Attributes.Method,
Saml2Constants
.Elements.SubjectConfirmation));
5143
subjectConfirmation.NameIdentifier = this.ReadSubjectId(reader,
Saml2Constants
.Elements.SubjectConfirmation);
5146
if (reader.IsStartElement(
Saml2Constants
.Elements.SubjectConfirmationData,
Saml2Constants
.Namespace))
5201
writer.WriteStartElement(
Saml2Constants
.Elements.SubjectConfirmation,
Saml2Constants
.Namespace);
5204
writer.WriteAttributeString(
Saml2Constants
.Attributes.Method, data.Method.AbsoluteUri);
5238
if (!reader.IsStartElement(
Saml2Constants
.Elements.SubjectConfirmationData,
Saml2Constants
.Namespace))
5240
reader.ReadStartElement(
Saml2Constants
.Elements.SubjectConfirmationData,
Saml2Constants
.Namespace);
5257
if (XmlUtil.EqualsQName(type,
Saml2Constants
.Types.KeyInfoConfirmationDataType,
Saml2Constants
.Namespace))
5261
else if (!XmlUtil.EqualsQName(type,
Saml2Constants
.Types.SubjectConfirmationDataType,
Saml2Constants
.Namespace))
5274
value = reader.GetAttribute(
Saml2Constants
.Attributes.Address);
5281
value = reader.GetAttribute(
Saml2Constants
.Attributes.InResponseTo);
5288
value = reader.GetAttribute(
Saml2Constants
.Attributes.NotBefore);
5295
value = reader.GetAttribute(
Saml2Constants
.Attributes.NotOnOrAfter);
5302
value = reader.GetAttribute(
Saml2Constants
.Attributes.Recipient);
5307
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID0011,
Saml2Constants
.Attributes.Recipient,
Saml2Constants
.Elements.SubjectConfirmationData));
5333
throw DiagnosticUtility.ThrowHelperXml(reader, SR.GetString(SR.ID4114,
Saml2Constants
.Elements.SubjectConfirmationData));
5380
writer.WriteStartElement(
Saml2Constants
.Elements.SubjectConfirmationData,
Saml2Constants
.Namespace);
5387
writer.WriteAttributeString("type", XmlSchema.InstanceNamespace,
Saml2Constants
.Types.KeyInfoConfirmationDataType);
5393
writer.WriteAttributeString(
Saml2Constants
.Attributes.Address, data.Address);
5399
writer.WriteAttributeString(
Saml2Constants
.Attributes.InResponseTo, data.InResponseTo.Value);
5405
writer.WriteAttributeString(
Saml2Constants
.Attributes.NotBefore, XmlConvert.ToString(data.NotBefore.Value.ToUniversalTime(), DateTimeFormats.Generated));
5411
writer.WriteAttributeString(
Saml2Constants
.Attributes.NotOnOrAfter, XmlConvert.ToString(data.NotOnOrAfter.Value.ToUniversalTime(), DateTimeFormats.Generated));
5417
writer.WriteAttributeString(
Saml2Constants
.Attributes.Recipient, data.Recipient.OriginalString);
5445
if (!reader.IsStartElement(
Saml2Constants
.Elements.SubjectLocality,
Saml2Constants
.Namespace))
5447
reader.ReadStartElement(
Saml2Constants
.Elements.SubjectLocality,
Saml2Constants
.Namespace);
5458
XmlUtil.ValidateXsiType(reader,
Saml2Constants
.Types.SubjectLocalityType,
Saml2Constants
.Namespace);
5461
subjectLocality.Address = reader.GetAttribute(
Saml2Constants
.Attributes.Address);
5464
subjectLocality.DnsName = reader.GetAttribute(
Saml2Constants
.Attributes.DNSName);
5510
writer.WriteStartElement(
Saml2Constants
.Elements.SubjectLocality,
Saml2Constants
.Namespace);
5515
writer.WriteAttributeString(
Saml2Constants
.Attributes.Address, data.Address);
5521
writer.WriteAttributeString(
Saml2Constants
.Attributes.DNSName, data.DnsName);
System\IdentityModel\Tokens\SamlSecurityTokenHandler.cs (1)
2730
reader.ReadStartElement(
Saml2Constants
.Elements.AttributeValue, SamlConstants.Namespace);