与 Kentor.AuthServices.Owin 0.18.0 和通常的流量日志一起工作。
200 GET https://some-saml2-idp.com/saml2/idp/SSO_1..39%3D&RelayState=Os..j
302 POST https://demo.local/AuthServices/Acs
200 GET for the set RedirectUri
升级到 Sustainsys.Saml2.Owin 2.2.0 后,我得到了这个流量日志......
200 GET https://some-saml2-idp.com/saml2/idp/SSO_1a7f5..sy%2Fh9rebTw%3D%3D&RelayState=1M..3c
302 POST https://demo.local/AuthServices/Acs
303 GET https://demo.local/login?error=access_denied
200 GET https://some-saml2-idp.com/saml2/idp/SSO_1a7f..NfLr6E299uPwE%3D&RelayState=cS..L
302 POST https://demo.local/AuthServices/Acs
404 GET https://demo.local/saml2/idp/SSO_1..39?SAMLRequest=hZ..bTw==&RelayState=1M..c&error=access_denied
我已经尝试在任何地方清除 cookie,并试图找到任何负责错误或错误参数的“自己的”代码。
如果我可以在不改变 IDP 方面的任何内容的情况下让我的两个分支机构都工作,我更愿意。
我的 Web.config 具有以下结构...
<sustainsys.saml2 entityId="https://demo.local/AuthServices"
returnUrl="https://demo.local"
publicOrigin="https://demo.local"
modulePath="/AuthServices">
<serviceCertificates>
<add fileName="~/somename.pfx"
use="Signing" />
</serviceCertificates>
<identityProviders>
<add entityId="My-IDP"
allowUnsolicitedAuthnResponse="true"
loadMetadata="true"
metadataLocation="https://some-saml2-idp.com/metadata" />
</identityProviders>
</sustainsys.saml2>
还有我的 Owin 创业公司...
var defaultSignInAsAuthType = "Cookies";
app.SetDefaultSignInAsAuthenticationType(defaultSignInAsAuthType);
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = defaultSignInAsAuthType,
ReturnUrlParameter = "returnUrl",
LoginPath = new PathString("/login"),
LogoutPath = new PathString("/logout")
});
var saml2Options = new Saml2AuthenticationOptions(true);
app.UseSaml2Authentication(saml2Options);
app.UseStageMarker(PipelineStage.Authenticate);
AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.Name;
我缺少什么来模仿旧包设置的行为?