master
huanghai 5 years ago
parent 7d5cb4fcee
commit 5e09d5cd54

@ -663,13 +663,9 @@ func checkOpenId(context *gin.Context) {
//3、写cookie
context.SetCookie(ConfigUtil.AccessToken, encodeString, 0, "/", "", false, true)
//4、跳转到XXX页面比如集成页或者管理员的首页
if identityId == 1 {
context.Redirect(301, "/dsBaseWeb/#/organization/bureau")
} else {
context.Redirect(301, "/dsBaseWeb/pages/personPortal/")
}
context.JSON(http.StatusOK, map[string]interface{}{"success": true, "openId": openId})
} else {
//2、如果此OpenId没有实现过挂接应该跳转到绑定用户页面
context.Redirect(301, "/sso/static/bindUser.html?openId="+openId)
context.JSON(http.StatusOK, map[string]interface{}{"success": false, "openId": openId})
}
}

@ -738,7 +738,7 @@ type swaggerInfo struct {
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "2.0",
Host: "10.10.14.187:8000",
Host: "127.0.0.1:8000",
BasePath: "",
Schemes: []string{},
Title: "东师理想统一认证中心(OAuth2+Sso)",

@ -7,7 +7,7 @@
"license": {},
"version": "2.0"
},
"host": "10.10.14.187:8000",
"host": "127.0.0.1:8000",
"paths": {
"/oauth2/access_token": {
"post": {

@ -32,7 +32,7 @@ definitions:
description: 个数
type: object
type: object
host: 10.10.14.187:8000
host: 127.0.0.1:8000
info:
contact: {}
description: 参考自xxl-sso

@ -67,7 +67,7 @@ func startOAuth2Server() {
// @title 东师理想统一认证中心(OAuth2+Sso)
// @version 2.0
// @description 参考自xxl-sso
// @host 10.10.14.187:8000
// @host 127.0.0.1:8000
func main() {
// 发布模式
//gin.SetMode(gin.ReleaseMode)

@ -34,6 +34,12 @@
},
async: false,
success: function (result) {
//if identityId == 1 {
// context.Redirect(301, "/dsBaseWeb/#/organization/bureau")
//} else {
// context.Redirect(301, "/dsBaseWeb/pages/personPortal/")
//}
//context.Redirect(301, "/sso/static/bindUser.html?openId="+openId)
}
});

Loading…
Cancel
Save