diff --git a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go index db992550..03322217 100644 --- a/dsSso/Controller/ControllerOauth2/ControllerOauth2.go +++ b/dsSso/Controller/ControllerOauth2/ControllerOauth2.go @@ -486,7 +486,6 @@ func logout(context *gin.Context) { // @Success 200 {string} string // @Router /oauth2/resetRemainCount [get] // @X-EmptyLimit ["userName"] -// http://10.10.14.187/oauth2/resetRemainCount?userName=sys1 func resetRemainCount(context *gin.Context) { userName := context.Query("userName") RedisUtil.DEL(Const.RemainCountRedisPrefix + userName) @@ -500,11 +499,10 @@ func resetRemainCount(context *gin.Context) { // @Tags 登录验证类 // @Accept application/x-www-form-urlencoded // @Produce json -// @Param code form string true "腾讯返回的code码" +// @Param code query string true "腾讯返回的code码" // @Success 200 {string} string // @Router /oauth2/wxLogin [get] // @X-EmptyLimit ["code"] -// http://10.10.14.187/oauth2/wxLogin?code=?? func wxLogin(context *gin.Context) { var code = context.PostForm("code") //对接微信,腾讯给的AK+SK @@ -537,7 +535,6 @@ func wxLogin(context *gin.Context) { // @Produce json // @Success 200 {string} string // @Router /oauth2/wxShowImg [get] -// http://10.10.14.187/oauth2/wxShowImg func wxShowImg(context *gin.Context) { url := `https://open.weixin.qq.com/connect/qrconnect?appid=wx3e0449144386938a&redirect_uri=http://fort.edusoa.com:7777/sso/static/jumpWx.html&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect` //获取http代码 diff --git a/dsSso/docs/docs.go b/dsSso/docs/docs.go index 6b010265..446026d8 100644 --- a/dsSso/docs/docs.go +++ b/dsSso/docs/docs.go @@ -362,6 +362,29 @@ var doc = `{ ] } }, + "/oauth2/wxShowImg": { + "get": { + "description": "微信显示二维码", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录验证类" + ], + "summary": "微信显示二维码", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, "/sso/addJoinApp": { "post": { "description": "增加一条接入系统的记录", diff --git a/dsSso/docs/swagger.json b/dsSso/docs/swagger.json index e0e90545..88303b3a 100644 --- a/dsSso/docs/swagger.json +++ b/dsSso/docs/swagger.json @@ -346,6 +346,29 @@ ] } }, + "/oauth2/wxShowImg": { + "get": { + "description": "微信显示二维码", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录验证类" + ], + "summary": "微信显示二维码", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + } + }, "/sso/addJoinApp": { "post": { "description": "增加一条接入系统的记录", diff --git a/dsSso/docs/swagger.yaml b/dsSso/docs/swagger.yaml index dd09f310..6f1f0050 100644 --- a/dsSso/docs/swagger.yaml +++ b/dsSso/docs/swagger.yaml @@ -265,6 +265,21 @@ paths: - 登录验证类 x-emptylimit: - code + /oauth2/wxShowImg: + get: + consumes: + - application/x-www-form-urlencoded + description: 微信显示二维码 + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + summary: 微信显示二维码 + tags: + - 登录验证类 /sso/addJoinApp: post: consumes: diff --git a/dsSso/main.go b/dsSso/main.go index 2b257b82..72b22ec9 100644 --- a/dsSso/main.go +++ b/dsSso/main.go @@ -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)