Browse Source

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

tags/v1.0.7
余 欣怀 11 months ago
parent
commit
10283347b6
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      services/sso/url.go

+ 2
- 2
services/sso/url.go 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)
}


Loading…
Cancel
Save