public void ExtractKeyInfo_01() { XmlDocument doc = LoadDocument(@"Saml20\Assertions\Saml2Assertion_01"); KeyInfo keyInfo = XmlSignatureUtils.ExtractSignatureKeys(doc); Assert.IsNotNull(keyInfo); }
/// <summary> /// Returns the KeyInfo element of the signature of the token. /// </summary> /// <returns>Null if the token is not signed. The KeyInfo element otherwise.</returns> public KeyInfo GetSignatureKeys() { if (!XmlSignatureUtils.IsSigned(_samlAssertion)) { return(null); } return(XmlSignatureUtils.ExtractSignatureKeys(_samlAssertion)); }
public void CanExtractKeyInfo() { // Arrange var doc = LoadDocument(TestContext.CurrentContext.TestDirectory + @"\Assertions\Saml2Assertion_01"); // Act var keyInfo = XmlSignatureUtils.ExtractSignatureKeys(doc); // Assert Assert.IsNotNull(keyInfo); }
public void CanExtractKeyInfo() { // Arrange var doc = LoadDocument(Path.Combine("Assertions", "Saml2Assertion_01")); // Act var keyInfo = XmlSignatureUtils.ExtractSignatureKeys(doc); // Assert Assert.NotNull(keyInfo); }
public void CanExtractKeyInfo() { // Arrange var doc = LoadDocument(@"Assertions\Saml2Assertion_01"); // Act var keyInfo = XmlSignatureUtils.ExtractSignatureKeys(doc); // Assert Assert.IsNotNull(keyInfo); }
/// <summary> /// Returns the KeyInfo element of the signature of the token. /// </summary> /// <returns>Null if the token is not signed. The KeyInfo element otherwise.</returns> public KeyInfo GetSignatureKeys() { return(!XmlSignatureUtils.IsSigned(XmlAssertion) ? null : XmlSignatureUtils.ExtractSignatureKeys(XmlAssertion)); }