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