Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional ServiceProvider.SigningCertificate #26

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions src/Owin.Security.Saml/SamlMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private string AuthnRequestForIdp(IdentityProvider identityProvider, Saml20Authn

var redirectBuilder = new HttpRedirectBindingBuilder
{
SigningKey = config.ServiceProvider.SigningCertificate.PrivateKey,
SigningKey = config.ServiceProvider.SigningCertificate?.PrivateKey,
Request = request.GetXml().OuterXml
};
if (context.Authentication != null &&
Expand Down Expand Up @@ -229,4 +229,4 @@ public override string BuildFormPost()
return base.BuildFormPost(); // See Saml20SignonHandler.cs, line 591 (post binding)
}
}
}
}
Copy link
Author

@samunro samunro Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where the newline came from. I even tried to reverse the change but I think that the web interface might add it in by default.