/// <summary> /// Initializes a new instance of the <see cref="Saml20Assertion"/> class. /// </summary> /// <param name="assertion">The assertion.</param> /// <param name="trustedSigners">If <code>null</code>, the signature of the given assertion is not verified.</param> /// <param name="profile">Determines the type of validation to perform on the token</param> /// <param name="quirksMode">if set to <c>true</c> quirks mode is enabled.</param> /// <param name="autoValidate">Turn automatic validation on or off</param> public Saml20Assertion(XmlElement assertion, IEnumerable <AsymmetricAlgorithm> trustedSigners, AssertionProfile profile, bool quirksMode, bool autoValidate) { this.profile = profile; _quirksMode = quirksMode; _autoValidate = autoValidate; LoadXml(assertion, trustedSigners); }
/// <summary> /// Validates the <see cref="AssertionProfile"/>. /// </summary> /// <param name="assertionProfile">The <see cref="AssertionProfile"/>.</param> private void ValidateAssertionProfile(AssertionProfile assertionProfile) { if (assertionProfile == null) { throw new Saml20ConfigurationException("Configuration AssertionProfile cannot be null"); } }
/// <summary> /// Initializes a new instance of the <see cref="Saml2Assertion" /> class. /// </summary> /// <param name="assertion">The assertion.</param> /// <param name="trustedSigners">If <code>null</code>, the signature of the given assertion is not verified.</param> /// <param name="profile">Determines the type of validation to perform on the token</param> /// <param name="audience"></param> /// <param name="quirksMode">if set to <c>true</c> quirks mode is enabled.</param> public Saml2Assertion(XmlElement assertion, IEnumerable <AsymmetricAlgorithm> trustedSigners, AssertionProfile profile, List <string> audience, bool quirksMode) { _profile = profile; _audience = audience; _quirksMode = quirksMode; LoadXml(assertion, trustedSigners); }
/// <summary> /// Initializes a new instance of the <see cref="Saml20Assertion"/> class. /// </summary> /// <param name="assertion">The assertion.</param> /// <param name="trustedSigners">If <code>null</code>, the signature of the given assertion is not verified.</param> /// <param name="quirksMode">if set to <c>true</c> quirks mode is enabled.</param> public Saml20Assertion(XmlElement assertion, IEnumerable<AsymmetricAlgorithm> trustedSigners, bool quirksMode) { _quirksMode = quirksMode; profile = AssertionProfile.DKSaml; LoadXml(assertion, trustedSigners); }
/// <summary> /// Initializes a new instance of the <see cref="Saml20Assertion"/> class. /// </summary> /// <param name="assertion">The assertion.</param> /// <param name="trustedSigners">If <code>null</code>, the signature of the given assertion is not verified.</param> /// <param name="profile">Determines the type of validation to perform on the token</param> /// <param name="quirksMode">if set to <c>true</c> quirks mode is enabled.</param> /// <param name="autoValidate">Turn automatic validation on or off</param> public Saml20Assertion(XmlElement assertion, IEnumerable<AsymmetricAlgorithm> trustedSigners, AssertionProfile profile, bool quirksMode, bool autoValidate) { this.profile = profile; _quirksMode = quirksMode; _autoValidate = autoValidate; LoadXml(assertion, trustedSigners); }
/// <summary> /// Initializes a new instance of the <see cref="Saml20Assertion"/> class. /// </summary> /// <param name="assertion">The assertion.</param> /// <param name="trustedSigners">If <code>null</code>, the signature of the given assertion is not verified.</param> /// <param name="quirksMode">if set to <c>true</c> quirks mode is enabled.</param> public Saml20Assertion(XmlElement assertion, IEnumerable <AsymmetricAlgorithm> trustedSigners, bool quirksMode) { _quirksMode = quirksMode; profile = AssertionProfile.DKSaml; LoadXml(assertion, trustedSigners); }