Skip to content

Commit

Permalink
Revert contributions from dariusdamalakas
Browse files Browse the repository at this point in the history
- dariusdamalakas hasn't replied to the request for license change, so code is removed.
  • Loading branch information
AndersAbel committed Sep 26, 2018
2 parents 130eb40 + 114c5c6 commit dc48723
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
4 changes: 0 additions & 4 deletions Sustainsys.Saml2/SAML2P/Saml2Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,6 @@ private void ValidateSignature(IOptions options)
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public IEnumerable<ClaimsIdentity> GetClaims(IOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
if (createClaimsException != null)
{
throw createClaimsException;
Expand Down
32 changes: 0 additions & 32 deletions Tests/Tests.Shared/Saml2P/Saml2ResponseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1747,38 +1747,6 @@ public void Saml2Response_GetClaims_NotThrowsOnReplayAssertionIdDifferentConfig(
a.Should().NotThrow();
}

[TestMethod]
public void Saml2Response_GetClaims_ThrowsOnEmptyOptions()
{
var response =
@"<?xml version=""1.0"" encoding=""UTF-8""?>
<saml2p:Response xmlns:saml2p=""urn:oasis:names:tc:SAML:2.0:protocol""
xmlns:saml2=""urn:oasis:names:tc:SAML:2.0:assertion""
ID = """ + MethodBase.GetCurrentMethod().Name + @""" Version=""2.0"" IssueInstant=""2013-01-01T00:00:00Z"">
<saml2:Issuer>https://idp.example.com</saml2:Issuer>
<saml2p:Status>
<saml2p:StatusCode Value=""urn:oasis:names:tc:SAML:2.0:status:Requester"" />
</saml2p:Status>
<saml2:Assertion
Version=""2.0"" ID=""" + MethodBase.GetCurrentMethod().Name + @"_Assertion""
IssueInstant=""2013-09-25T00:00:00Z"">
<saml2:Issuer>https://idp.example.com</saml2:Issuer>
<saml2:Subject>
<saml2:NameID>SomeUser</saml2:NameID>
<saml2:SubjectConfirmation Method=""urn:oasis:names:tc:SAML:2.0:cm:bearer"" />
</saml2:Subject>
<saml2:Conditions NotOnOrAfter=""2100-01-01T00:00:00Z"" />
</saml2:Assertion>
</saml2p:Response>";

var xml = SignedXmlHelper.SignXml(response);

var subject = Saml2Response.Read(xml);

Action a = () => subject.GetClaims(null);
a.Should().Throw<ArgumentNullException>().And.ParamName.Should().Be("options");
}

[TestMethod]
public void Saml2Response_GetClaims_ThrowsOnStatusFailure()
{
Expand Down

0 comments on commit dc48723

Please sign in to comment.