|
|
|
@ -7,7 +7,6 @@ import (
|
|
|
|
|
"dsSso/Service/ServiceJoinApp"
|
|
|
|
|
"dsSso/Utils"
|
|
|
|
|
"dsSso/Utils/ConfigUtil"
|
|
|
|
|
"dsSso/Utils/DbUtil"
|
|
|
|
|
"dsSso/Utils/FileUtil"
|
|
|
|
|
"dsSso/Utils/RedisStorage"
|
|
|
|
|
"dsSso/Utils/RedisUtil"
|
|
|
|
@ -38,18 +37,8 @@ func startOAuth2Server() {
|
|
|
|
|
cfg.AllowedAccessTypes = append(cfg.AllowedAccessTypes, osin.REFRESH_TOKEN)
|
|
|
|
|
RedisStorage.OsinServer = osin.NewServer(cfg, RedisStorage.OAuth2RedisStorage)
|
|
|
|
|
|
|
|
|
|
//清理redis中关于接入系统的缓存
|
|
|
|
|
var db = DbUtil.Engine
|
|
|
|
|
sql := "select * from t_app_base"
|
|
|
|
|
list, _ := db.SQL(sql).Query().List()
|
|
|
|
|
for i := range list {
|
|
|
|
|
var appId = list[i]["app_id"].(string)
|
|
|
|
|
//删除redis查询缓存
|
|
|
|
|
RedisUtil.DEL("TAppBase:" + appId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//这里需要循环从数据库中获取数据
|
|
|
|
|
list, _ = ServiceJoinApp.GetAppBaseList(1, 1000, "")
|
|
|
|
|
list, _ := ServiceJoinApp.GetAppBaseList(1, 1000, "")
|
|
|
|
|
for i := 0; i < len(list); i++ {
|
|
|
|
|
appKey := list[i]["access_key"].(string)
|
|
|
|
|
secret := list[i]["secret_key"].(string)
|
|
|
|
|