master
huanghai 5 years ago
parent 7b2224c9a3
commit b6bd63ed67

@ -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代码

@ -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": "增加一条接入系统的记录",

@ -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": "增加一条接入系统的记录",

@ -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:

@ -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)

Loading…
Cancel
Save