master
黄海 5 years ago
parent 9b7eab0a71
commit 53b23877b7

@ -6,6 +6,7 @@ import (
"dsBaseWeb/Utils/ConfigUtil"
"dsBaseWeb/Utils/RedisUtil"
"encoding/base64"
"fmt"
"github.com/gin-gonic/gin"
"github.com/valyala/fasthttp"
"net/http"
@ -73,7 +74,12 @@ func CheckSsoCode(c *gin.Context) {
args.Add("redirect_uri", redirectURI)
//用POST调用统一认证验证code接口
_, resp, _ := fasthttp.Post(nil, checkCodeUrl, args)
_, resp, err := fasthttp.Post(nil, checkCodeUrl, args)
if err != nil {
fmt.Print(err.Error())
return
}
//统一认证返回的信息
respMap := CommonUtil.ConvertJsonStringToMap(string(resp))
accessToken := respMap["access_token"].(string)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -10,7 +10,7 @@ definitions:
example: "true"
type: boolean
type: object
host: 10.10.14.187:8002
host: 127.0.0.1:8002
info:
contact:
email: support@swagger.io

@ -31,7 +31,7 @@ import (
// @contact.email support@swagger.io
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host 10.10.14.187:8002
// @host 127.0.0.1:8002
func main() {
// 发布模式
//gin.SetMode(gin.ReleaseMode)

Loading…
Cancel
Save