|
|
|
@ -4,6 +4,7 @@ import (
|
|
|
|
|
"dsSso/Const"
|
|
|
|
|
"dsSso/Const/DefaultConst"
|
|
|
|
|
"dsSso/Controller/ControllerRecaptcha"
|
|
|
|
|
"dsSso/Dao/DaoBaseGlobal"
|
|
|
|
|
"dsSso/Model"
|
|
|
|
|
"dsSso/Service/ServiceJoinApp"
|
|
|
|
|
"dsSso/Service/ServiceLoginPerson"
|
|
|
|
@ -404,6 +405,7 @@ func authorizeGet(context *gin.Context) {
|
|
|
|
|
// @Description 退出统一认证
|
|
|
|
|
// @Tags 登录验证类
|
|
|
|
|
// @Accept application/x-www-form-urlencoded
|
|
|
|
|
// @Param redirect_uri query string true "redirect_uri"
|
|
|
|
|
// @Produce json
|
|
|
|
|
// @Success 200 {string} string
|
|
|
|
|
// @Router /oauth2/logout [get]
|
|
|
|
@ -432,6 +434,14 @@ func logout(context *gin.Context) {
|
|
|
|
|
}
|
|
|
|
|
//清除cookie
|
|
|
|
|
SsoUtil.DeleteSsoCookie(context)
|
|
|
|
|
msg := "统一认证退出成功!"
|
|
|
|
|
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
|
|
|
|
|
//跳转回去,系统默认统一的回调首页
|
|
|
|
|
list, err := DaoBaseGlobal.GetGlobalInfoByValue(`defaultIndexUrl`)
|
|
|
|
|
if err != nil || len(list) == 0 {
|
|
|
|
|
msg := "获取全局变量defaultIndexUrl失败!"
|
|
|
|
|
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "msg": msg})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
globalValue := list[0]["global_value"].(string)
|
|
|
|
|
context.Redirect(302, string(globalValue))
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|