Skip to content

Commit

Permalink
Add authnContext in test IdP
Browse files Browse the repository at this point in the history
  • Loading branch information
Revsgaard committed Jan 5, 2024
1 parent 30f14d1 commit 84b05f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/TestIdPCore/Controllers/AuthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ private IActionResult LoginPostResponse(Saml2Id inResponseTo, Saml2StatusCodes s
//saml2AuthnResponse.NameId = new Saml2NameIdentifier(claimsIdentity.Claims.Where(c => c.Type == ClaimTypes.NameIdentifier).Select(c => c.Value).Single());
saml2AuthnResponse.ClaimsIdentity = claimsIdentity;

var token = saml2AuthnResponse.CreateSecurityToken(relyingParty.Issuer, /*declAuthnContext: new Uri("urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified"),*/ subjectConfirmationLifetime: 5, issuedTokenLifetime: 60);


var token = saml2AuthnResponse.CreateSecurityToken(relyingParty.Issuer, /*authnContext: new Uri("urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"),*/ /*declAuthnContext: new Uri("urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified"),*/ subjectConfirmationLifetime: 5, issuedTokenLifetime: 60);
}

return responsebinding.Bind(saml2AuthnResponse).ToActionResult();
Expand Down

0 comments on commit 84b05f7

Please sign in to comment.