master
黄海 5 years ago
parent b65de23460
commit e62a618231

@ -10,3 +10,11 @@
[Error]2020/09/09 14:31:02 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value [Error]2020/09/09 14:31:02 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/09/16 15:14:03 SqlQueryError sql: expected 1 arguments, got 3 [Error]2020/09/16 15:14:03 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/09/16 15:14:03 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value [Error]2020/09/16 15:14:03 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/12/17 11:42:53 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/12/17 11:42:53 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/12/17 11:44:23 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/12/17 11:44:23 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/12/17 11:46:05 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/12/17 11:46:05 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/12/17 11:47:32 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/12/17 11:47:32 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value

@ -93,11 +93,5 @@ func CheckSsoCode(c *gin.Context) {
RedisUtil.EXPIRE(accessToken) RedisUtil.EXPIRE(accessToken)
//跳转到最终访问的地址 //跳转到最终访问的地址
c.Redirect(http.StatusFound, reqCallBackURL) c.Redirect(http.StatusMovedPermanently, reqCallBackURL)
//c.Header("Content-Type", "text/html;charset=utf-8")
/*
html := `<script language="javascript" type="text/javascript">
window.location.href='` + reqCallBackURL + `';
</script>`*/
//c.String(200, `<p>黄海测试</p>`)
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -191,7 +191,7 @@ func generateAuthCode(context *gin.Context, identityId string, personId string,
}) })
return return
} else { //GET方式跳转回客户端的回调页 } else { //GET方式跳转回客户端的回调页
context.Redirect(302, url) context.Redirect(301, url)
return return
} }
} }

@ -19,7 +19,6 @@ var doc = `{
"description": "{{.Description}}", "description": "{{.Description}}",
"title": "{{.Title}}", "title": "{{.Title}}",
"contact": {}, "contact": {},
"license": {},
"version": "{{.Version}}" "version": "{{.Version}}"
}, },
"host": "{{.Host}}", "host": "{{.Host}}",
@ -191,7 +190,7 @@ var doc = `{
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"client_id", "client_id",
"redirect_uri", "redirect_uri",
"device_id", "device_id",
@ -267,13 +266,13 @@ var doc = `{
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"username", "username",
"password", "password",
"captchaId", "captchaId",
"value" "value"
], ],
"x-intlimit": [ "X-IntLimit": [
"device_id" "device_id"
] ]
} }
@ -409,7 +408,7 @@ var doc = `{
} }
} }
}, },
"x-lengthlimit": [ "X-LengthLimit": [
{ {
"captchaId": "20,20" "captchaId": "20,20"
} }
@ -478,7 +477,7 @@ var doc = `{
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"userName" "userName"
] ]
} }
@ -536,7 +535,7 @@ var doc = `{
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"code" "code"
] ]
} }
@ -571,7 +570,7 @@ var doc = `{
} }
} }
}, },
"x-intlimit": [ "X-IntLimit": [
"app_id" "app_id"
] ]
} }
@ -664,7 +663,7 @@ type swaggerInfo struct {
// SwaggerInfo holds exported Swagger Info so clients can modify it // SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{ var SwaggerInfo = swaggerInfo{
Version: "2.0", Version: "2.0",
Host: "127.0.0.1:8000", Host: "10.10.14.187:8000",
BasePath: "", BasePath: "",
Schemes: []string{}, Schemes: []string{},
Title: "东师理想统一认证中心(OAuth2+Sso)", Title: "东师理想统一认证中心(OAuth2+Sso)",

@ -4,10 +4,9 @@
"description": "参考自xxl-sso", "description": "参考自xxl-sso",
"title": "东师理想统一认证中心(OAuth2+Sso)", "title": "东师理想统一认证中心(OAuth2+Sso)",
"contact": {}, "contact": {},
"license": {},
"version": "2.0" "version": "2.0"
}, },
"host": "127.0.0.1:8000", "host": "10.10.14.187:8000",
"paths": { "paths": {
"/oauth2/AddClient": { "/oauth2/AddClient": {
"post": { "post": {
@ -175,7 +174,7 @@
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"client_id", "client_id",
"redirect_uri", "redirect_uri",
"device_id", "device_id",
@ -251,13 +250,13 @@
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"username", "username",
"password", "password",
"captchaId", "captchaId",
"value" "value"
], ],
"x-intlimit": [ "X-IntLimit": [
"device_id" "device_id"
] ]
} }
@ -393,7 +392,7 @@
} }
} }
}, },
"x-lengthlimit": [ "X-LengthLimit": [
{ {
"captchaId": "20,20" "captchaId": "20,20"
} }
@ -462,7 +461,7 @@
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"userName" "userName"
] ]
} }
@ -520,7 +519,7 @@
} }
} }
}, },
"x-emptylimit": [ "X-EmptyLimit": [
"code" "code"
] ]
} }
@ -555,7 +554,7 @@
} }
} }
}, },
"x-intlimit": [ "X-IntLimit": [
"app_id" "app_id"
] ]
} }

@ -32,11 +32,10 @@ definitions:
description: 个数 description: 个数
type: object type: object
type: object type: object
host: 127.0.0.1:8000 host: 10.10.14.187:8000
info: info:
contact: {} contact: {}
description: 参考自xxl-sso description: 参考自xxl-sso
license: {}
title: 东师理想统一认证中心(OAuth2+Sso) title: 东师理想统一认证中心(OAuth2+Sso)
version: "2.0" version: "2.0"
paths: paths:
@ -118,6 +117,11 @@ paths:
- 登录验证类 - 登录验证类
/oauth2/authorize: /oauth2/authorize:
get: get:
X-EmptyLimit:
- client_id
- redirect_uri
- device_id
- oauth_callback
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 登录验证跳转路由 description: 登录验证跳转路由
@ -152,12 +156,14 @@ paths:
summary: 登录验证跳转路由 summary: 登录验证跳转路由
tags: tags:
- 登录验证类 - 登录验证类
x-emptylimit:
- client_id
- redirect_uri
- device_id
- oauth_callback
post: post:
X-EmptyLimit:
- username
- password
- captchaId
- value
X-IntLimit:
- device_id
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 验证post description: 验证post
@ -205,13 +211,6 @@ paths:
summary: 验证post summary: 验证post
tags: tags:
- 登录验证类 - 登录验证类
x-emptylimit:
- username
- password
- captchaId
- value
x-intlimit:
- device_id
/oauth2/bindWxUser: /oauth2/bindWxUser:
get: get:
consumes: consumes:
@ -281,6 +280,8 @@ paths:
- 登录验证类 - 登录验证类
/oauth2/getCaptchaPng: /oauth2/getCaptchaPng:
get: get:
X-LengthLimit:
- captchaId: 20,20
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 获取验证码图片 description: 获取验证码图片
@ -300,8 +301,6 @@ paths:
summary: 获取验证码图片 summary: 获取验证码图片
tags: tags:
- 登录验证类 - 登录验证类
x-lengthlimit:
- captchaId: 20,20
/oauth2/logout: /oauth2/logout:
get: get:
consumes: consumes:
@ -325,6 +324,8 @@ paths:
- 登录验证类 - 登录验证类
/oauth2/resetRemainCount: /oauth2/resetRemainCount:
get: get:
X-EmptyLimit:
- userName
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 重置错误重试次数限制 description: 重置错误重试次数限制
@ -344,8 +345,6 @@ paths:
summary: 重置错误重试次数限制 summary: 重置错误重试次数限制
tags: tags:
- 登录验证类 - 登录验证类
x-emptylimit:
- userName
/oauth2/unBindWxUser: /oauth2/unBindWxUser:
get: get:
consumes: consumes:
@ -363,6 +362,8 @@ paths:
- 解除登录验证类 - 解除登录验证类
/oauth2/wxLogin: /oauth2/wxLogin:
post: post:
X-EmptyLimit:
- code
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 微信登录 description: 微信登录
@ -382,10 +383,10 @@ paths:
summary: 微信登录 summary: 微信登录
tags: tags:
- 登录验证类 - 登录验证类
x-emptylimit:
- code
/sso/getAppInfoById: /sso/getAppInfoById:
get: get:
X-IntLimit:
- app_id
consumes: consumes:
- application/x-www-form-urlencoded - application/x-www-form-urlencoded
description: 根据appId获取接入第三方统一认证系统的信息 description: 根据appId获取接入第三方统一认证系统的信息
@ -405,8 +406,6 @@ paths:
summary: 根据appId获取接入第三方统一认证系统的信息 summary: 根据appId获取接入第三方统一认证系统的信息
tags: tags:
- 接入系统维护类 - 接入系统维护类
x-intlimit:
- app_id
/sso/login: /sso/login:
get: get:
consumes: consumes:

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

Loading…
Cancel
Save