Skip to content

Commit 3b2b29e

Browse files
committed
Remove AuthnContextDeclRef from assertion.
1 parent 2bac844 commit 3b2b29e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ITfoxtec.Identity.Saml2/Tokens/Saml2ResponseSecurityTokenHandler.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,15 @@ public override string WriteToken(SecurityToken token)
120120
}
121121
return builder.ToString();
122122
}
123+
124+
protected override void ProcessAuthenticationStatement(Saml2AuthenticationStatement statement, ClaimsIdentity identity, string issuer)
125+
{
126+
if (statement?.AuthenticationContext?.DeclarationReference != null)
127+
{
128+
// Remove AuthnContextDeclRef from assertion.
129+
statement.AuthenticationContext.DeclarationReference = null;
130+
}
131+
base.ProcessAuthenticationStatement(statement, identity, issuer);
132+
}
123133
}
124134
}

0 commit comments

Comments
 (0)