feat: support AuthnRequest in SAML (#372)

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
This commit is contained in:
Yixiang Zhao
2021-12-15 21:38:00 +08:00
committed by GitHub
parent f43d01c5c2
commit 370e835499
6 changed files with 66 additions and 23 deletions

View File

@ -364,11 +364,12 @@ func (c *ApiController) Login() {
func (c *ApiController) GetSamlLogin() {
providerId := c.Input().Get("id")
authURL, err := object.GenerateSamlLoginUrl(providerId)
relayState := c.Input().Get("relayState")
authURL, method, err := object.GenerateSamlLoginUrl(providerId, relayState)
if err != nil {
c.ResponseError(err.Error())
}
c.ResponseOk(authURL)
c.ResponseOk(authURL, method)
}
func (c *ApiController) HandleSamlLogin() {