feat: fix SAML's redirectUrl and POST ProtocolBinding (#3498)

This commit is contained in:
Wind Li
2025-01-13 20:55:37 +08:00
committed by GitHub
parent 7ddc2778c0
commit 19f62a461b
3 changed files with 5 additions and 2 deletions

View File

@ -338,6 +338,9 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h
} else if authnRequest.AssertionConsumerServiceURL == "" {
return "", "", "", fmt.Errorf("err: SAML request don't has attribute 'AssertionConsumerServiceURL' in <samlp:AuthnRequest>")
}
if authnRequest.ProtocolBinding == "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" {
method = "POST"
}
_, originBackend := getOriginFromHost(host)