Skip to content

Commit ada4b16

Browse files
committed
Add an option to ignore signature validation
1 parent f675f79 commit ada4b16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ProgressOnderwijsUtils/SingleSignOn/SsoProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static string EncodeQueryParameter(string key, string value)
4444
return null;
4545
}
4646

47-
public static Maybe<SsoAttributes, string> GetAttributes(string rawSamlResponse, X509Certificate2 certificate)
47+
public static Maybe<SsoAttributes, string> GetAttributes(string rawSamlResponse, X509Certificate2 certificate, bool ignoreSignatureCheck = false)
4848
{
4949
byte[] bytes;
5050
try {
@@ -85,7 +85,7 @@ public static Maybe<SsoAttributes, string> GetAttributes(string rawSamlResponse,
8585
return Maybe.Error("Public key missing");
8686
}
8787

88-
if (!dsig.CheckSignature(key)) {
88+
if (!dsig.CheckSignature(key) && !ignoreSignatureCheck) {
8989
return Maybe.Error("Signature invalid");
9090
}
9191

0 commit comments

Comments
 (0)