修改获取SSO登入登出URL方法

This commit is contained in:
余 欣怀 2023-06-20 15:54:22 +08:00
parent 67b30db9b4
commit 10283347b6

View File

@ -13,8 +13,8 @@ func GetLoginUrl(ident string, redirectUrl string, env ...string) string {
return fmt.Sprintf("%s://%s%s", scheme, host, uri)
}
func GetLogoutUrl(ident string, env ...string) string {
uri := fmt.Sprintf("/admin/main/loginOut?ident=%s&redirectUrl=", ident)
func GetLogoutUrl(ident string, redirectUrl string, env ...string) string {
uri := fmt.Sprintf("/admin/main/loginOut?ident=%s&redirectUrl=%s", ident, url.QueryEscape(redirectUrl))
scheme, host := getSchemeAndHost(env...)
return fmt.Sprintf("%s://%s%s", scheme, host, uri)
}