Ver código fonte

正式构建版本 1.0.0

xjg 5 meses atrás
pai
commit
fba3a23bb5

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 1 - 1
api/admin_common/enter.go

@@ -1,6 +1,6 @@
 package admin_common
 
-import pb "sghblog.com/paas/authorization-service/proto"
+import pb "sghgogs.com/sghblog/authorization-service/proto"
 
 type ApiAdminCommon struct {
 	Service pb.CommonService

+ 6 - 6
api/admin_common/login.go

@@ -3,12 +3,12 @@ package admin_common
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/model/base"
-	res "sghblog.com/paas/authorization-client/model/response/common"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
-	"sghblog.com/paas/common"
+	"sghgogs.com/sghblog/authorization-client/model/base"
+	res "sghgogs.com/sghblog/authorization-client/model/response/common"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
+	"sghgogs.com/sghblog/common"
 )
 
 type Request struct {

+ 3 - 3
api/admin_common/logout.go

@@ -3,9 +3,9 @@ package admin_common
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 // Logout

+ 5 - 5
api/admin_common/profile.go

@@ -3,11 +3,11 @@ package admin_common
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/model/base"
-	"sghblog.com/paas/authorization-client/model/response/common"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/model/base"
+	"sghgogs.com/sghblog/authorization-client/model/response/common"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 // Profile

+ 4 - 4
api/admin_user/create_admin_user.go

@@ -3,10 +3,10 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
-	"sghblog.com/paas/common"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
+	"sghgogs.com/sghblog/common"
 )
 
 type UserRequest struct {

+ 4 - 4
api/admin_user/delete_admin_user.go

@@ -3,10 +3,10 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
-	"sghblog.com/paas/common"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
+	"sghgogs.com/sghblog/common"
 	"strconv"
 )
 

+ 1 - 1
api/admin_user/enter.go

@@ -1,6 +1,6 @@
 package admin_user
 
-import pb "sghblog.com/paas/authorization-service/proto"
+import pb "sghgogs.com/sghblog/authorization-service/proto"
 
 type ApiAdminUser struct {
 	Service pb.AdminUserService

+ 5 - 5
api/admin_user/get_admin_user.go

@@ -3,11 +3,11 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/model/base"
-	"sghblog.com/paas/authorization-client/model/response/admin"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/model/base"
+	"sghgogs.com/sghblog/authorization-client/model/response/admin"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 	"strconv"
 )
 

+ 6 - 6
api/admin_user/list_admin_users.go

@@ -3,12 +3,12 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/model/base"
-	"sghblog.com/paas/authorization-client/model/response/admin"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
-	"sghblog.com/paas/common"
+	"sghgogs.com/sghblog/authorization-client/model/base"
+	"sghgogs.com/sghblog/authorization-client/model/response/admin"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
+	"sghgogs.com/sghblog/common"
 	"strconv"
 	"time"
 )

+ 3 - 3
api/admin_user/retrieve_enabled_users.go

@@ -3,9 +3,9 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 type EnabledUserItem struct {

+ 5 - 5
api/admin_user/toggle_admin_user.go

@@ -3,11 +3,11 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/model/base"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
-	"sghblog.com/paas/common"
+	"sghgogs.com/sghblog/authorization-client/model/base"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
+	"sghgogs.com/sghblog/common"
 	"strconv"
 )
 

+ 4 - 4
api/admin_user/update_admin_user.go

@@ -3,10 +3,10 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"net/http"
-	"sghblog.com/paas/authorization-client/response"
-	"sghblog.com/paas/authorization-client/utils"
-	pb "sghblog.com/paas/authorization-service/proto"
-	"sghblog.com/paas/common"
+	"sghgogs.com/sghblog/authorization-client/response"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
+	"sghgogs.com/sghblog/common"
 	"strconv"
 )
 

+ 3 - 1
go.mod

@@ -9,6 +9,7 @@ require (
 	github.com/go-micro/plugins/v4/registry/consul v1.2.1
 	github.com/go-micro/plugins/v4/server/http v1.2.2
 	github.com/go-redsync/redsync/v4 v4.11.0
+	github.com/google/uuid v1.3.0
 	github.com/pkg/errors v0.9.1
 	github.com/redis/go-redis/v9 v9.3.0
 	github.com/sirupsen/logrus v1.9.0
@@ -22,6 +23,8 @@ require (
 	go.opentelemetry.io/otel/trace v1.21.0
 	golang.org/x/net v0.17.0
 	google.golang.org/protobuf v1.31.0
+	sghgogs.com/sghblog/authorization-service v0.0.0-20231219071555-2d739b878799
+	sghgogs.com/sghblog/common v0.0.0-20231219070006-58d7e2000e0a
 )
 
 require (
@@ -65,7 +68,6 @@ require (
 	github.com/gobwas/ws v1.0.4 // indirect
 	github.com/goccy/go-json v0.10.2 // indirect
 	github.com/golang/protobuf v1.5.3 // indirect
-	github.com/google/uuid v1.3.0 // indirect
 	github.com/gorilla/handlers v1.5.1 // indirect
 	github.com/hashicorp/consul/api v1.9.0 // indirect
 	github.com/hashicorp/errwrap v1.1.0 // indirect

+ 4 - 0
go.sum

@@ -972,3 +972,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+sghgogs.com/sghblog/authorization-service v0.0.0-20231219071555-2d739b878799 h1:DeOXD6shZA+LIhZZ2pFw0LyBUyAIpVPisvbkHVZhukg=
+sghgogs.com/sghblog/authorization-service v0.0.0-20231219071555-2d739b878799/go.mod h1:7iGPIlilHSF0tQdxNWSlax/R6gQEnycXjVsWnOI3Vgs=
+sghgogs.com/sghblog/common v0.0.0-20231219070006-58d7e2000e0a h1:QfEb62RyInH+XxxJBmGTYx4c0gFlrsrX3ybjihrIcR8=
+sghgogs.com/sghblog/common v0.0.0-20231219070006-58d7e2000e0a/go.mod h1:DcFGf3a/9IznsK3wIp2M2WbzwKWu9aBqQ96jD8NOTmY=

+ 4 - 4
main.go

@@ -14,10 +14,10 @@ import (
 	"go.opentelemetry.io/otel/propagation"
 	"golang.org/x/net/context"
 	"os"
-	"sghblog.com/paas/authorization-client/config"
-	"sghblog.com/paas/authorization-client/router"
-	"sghblog.com/paas/authorization-client/utils/authutil"
-	"sghblog.com/paas/authorization-client/utils/tracing"
+	"sghgogs.com/sghblog/authorization-client/config"
+	"sghgogs.com/sghblog/authorization-client/router"
+	"sghgogs.com/sghblog/authorization-client/utils/authutil"
+	"sghgogs.com/sghblog/authorization-client/utils/tracing"
 	"time"
 )
 

+ 1 - 1
model/base/base.go

@@ -2,7 +2,7 @@ package base
 
 import (
 	"github.com/pkg/errors"
-	pb "sghblog.com/paas/authorization-service/proto"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 type ListMapItem struct {

+ 1 - 1
model/response/admin/role.go

@@ -1,7 +1,7 @@
 package admin
 
 import (
-	"sghblog.com/paas/authorization-client/model/base"
+	"sghgogs.com/sghblog/authorization-client/model/base"
 	"time"
 )
 

+ 1 - 1
model/response/admin/user.go

@@ -1,7 +1,7 @@
 package admin
 
 import (
-	"sghblog.com/paas/authorization-client/model/base"
+	"sghgogs.com/sghblog/authorization-client/model/base"
 	"time"
 )
 

+ 1 - 1
model/response/common/common.go

@@ -1,6 +1,6 @@
 package common
 
-import "sghblog.com/paas/authorization-client/model/base"
+import "sghgogs.com/sghblog/authorization-client/model/base"
 
 type UserInfo struct {
 	Id          int64              `json:"id"`

+ 2 - 2
response/response.go

@@ -6,8 +6,8 @@ import (
 	"github.com/pkg/errors"
 	"github.com/sirupsen/logrus"
 	"net/http"
-	"sghblog.com/paas/common"
-	"sghblog.com/paas/common/errorcode"
+	"sghgogs.com/sghblog/common"
+	"sghgogs.com/sghblog/common/errorcode"
 	"strconv"
 )
 

+ 6 - 6
router/router.go

@@ -3,17 +3,17 @@ package router
 import (
 	"github.com/gin-gonic/gin"
 	"github.com/sirupsen/logrus"
-	"sghblog.com/paas/authorization-client/router/v1/admin_role"
-	"sghblog.com/paas/authorization-client/router/v1/admin_user"
+	"sghgogs.com/sghblog/authorization-client/router/v1/admin_role"
+	"sghgogs.com/sghblog/authorization-client/router/v1/admin_user"
 
 	swaggerFiles "github.com/swaggo/files"
 	"github.com/swaggo/gin-swagger"
 	"go-micro.dev/v4/client"
 	"net/http"
-	_ "sghblog.com/paas/authorization-client/docs"
-	"sghblog.com/paas/authorization-client/router/v1/admin_common"
-	"sghblog.com/paas/authorization-client/utils/baseservice"
-	"sghblog.com/paas/authorization-client/utils/tracing"
+	_ "sghgogs.com/sghblog/authorization-client/docs"
+	"sghgogs.com/sghblog/authorization-client/router/v1/admin_common"
+	"sghgogs.com/sghblog/authorization-client/utils/baseservice"
+	"sghgogs.com/sghblog/authorization-client/utils/tracing"
 	"time"
 )
 

+ 4 - 4
router/v1/admin_common/common.go

@@ -3,10 +3,10 @@ package admin_common
 import (
 	"github.com/gin-gonic/gin"
 	"go-micro.dev/v4/client"
-	"sghblog.com/paas/authorization-client/api/admin_common"
-	"sghblog.com/paas/authorization-client/utils"
-	"sghblog.com/paas/authorization-client/utils/baseservice"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/api/admin_common"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	"sghgogs.com/sghblog/authorization-client/utils/baseservice"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 type AdminCommon struct {

+ 4 - 4
router/v1/admin_role/role.go

@@ -3,10 +3,10 @@ package admin_role
 import (
 	"github.com/gin-gonic/gin"
 	"go-micro.dev/v4/client"
-	"sghblog.com/paas/authorization-client/api/admin_role"
-	"sghblog.com/paas/authorization-client/utils"
-	"sghblog.com/paas/authorization-client/utils/baseservice"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/api/admin_role"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	"sghgogs.com/sghblog/authorization-client/utils/baseservice"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 type AdminRole struct {

+ 4 - 4
router/v1/admin_user/user.go

@@ -3,10 +3,10 @@ package admin_user
 import (
 	"github.com/gin-gonic/gin"
 	"go-micro.dev/v4/client"
-	"sghblog.com/paas/authorization-client/api/admin_user"
-	"sghblog.com/paas/authorization-client/utils"
-	"sghblog.com/paas/authorization-client/utils/baseservice"
-	pb "sghblog.com/paas/authorization-service/proto"
+	"sghgogs.com/sghblog/authorization-client/api/admin_user"
+	"sghgogs.com/sghblog/authorization-client/utils"
+	"sghgogs.com/sghblog/authorization-client/utils/baseservice"
+	pb "sghgogs.com/sghblog/authorization-service/proto"
 )
 
 type AdminUser struct {

+ 18 - 17
utils/authutil/authutil.go

@@ -6,13 +6,14 @@ import (
 	"github.com/go-micro/plugins/v4/auth/jwt"
 	"github.com/go-redsync/redsync/v4"
 	"github.com/go-redsync/redsync/v4/redis/goredis/v9"
+	"github.com/google/uuid"
 	goredislib "github.com/redis/go-redis/v9"
 	"github.com/sirupsen/logrus"
 	"go-micro.dev/v4/auth"
 	"os"
 	"os/signal"
-	"sghblog.com/paas/common"
-	"sghblog.com/paas/common/errorcode"
+	"sghgogs.com/sghblog/common"
+	"sghgogs.com/sghblog/common/errorcode"
 	"strconv"
 	"strings"
 	"sync"
@@ -26,12 +27,12 @@ var (
 )
 
 const (
-	expiry = time.Second * time.Duration(0.5*3600)
+	expiry = time.Second * time.Duration(24*3600)
 	// expiry = time.Second * time.Duration(1*3600)
 )
 
 type JWTAuth struct {
-	mu        *redsync.Redsync
+	Mu        *redsync.Redsync
 	Client    *goredislib.Client
 	Auth      auth.Auth
 	namespace string
@@ -61,7 +62,7 @@ func NewJWTAuth(client *goredislib.Client, namespace string, enable bool) *JWTAu
 		// lock.
 		rs := redsync.New(pool)
 		JWTAuthService = &JWTAuth{
-			mu:        rs,
+			Mu:        rs,
 			Client:    client,
 			Auth:      newAuth,
 			namespace: namespace,
@@ -76,7 +77,7 @@ func NewJWTAuth(client *goredislib.Client, namespace string, enable bool) *JWTAu
 // GenerateToken 示例:生成令牌
 func (svc *JWTAuth) GenerateToken(userID int64, provider, withType, secret string, scopes []string, md map[string]string) (*auth.Account, error) {
 	var account *auth.Account
-	lock := svc.mu.NewMutex("generate-token-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("generate-token-lock-%d", userID))
 	// 获取锁,保证原子性
 	if err := lock.Lock(); err != nil {
 		return account, err
@@ -101,7 +102,7 @@ func (svc *JWTAuth) GenerateToken(userID int64, provider, withType, secret strin
 
 func (svc *JWTAuth) RefreshToken(token string) (*auth.Token, error) {
 	var authToken *auth.Token
-	lock := svc.mu.NewMutex("refresh-generate-token-lock")
+	lock := svc.Mu.NewMutex("refresh-generate-token-lock")
 	// 获取锁,保证原子性
 	if err := lock.Lock(); err != nil {
 		return authToken, err
@@ -131,7 +132,7 @@ func (svc *JWTAuth) RefreshToken(token string) (*auth.Token, error) {
 // Token 重新刷新token
 func (svc *JWTAuth) Token(userID int64, accessToken string) (*auth.Token, error) {
 	var authToken *auth.Token
-	lock := svc.mu.NewMutex("token-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("token-lock-%d", userID))
 	// 获取锁,保证原子性
 	if err := lock.Lock(); err != nil {
 		return authToken, err
@@ -147,7 +148,7 @@ func (svc *JWTAuth) Token(userID int64, accessToken string) (*auth.Token, error)
 // Inspect 检测token 有效期
 func (svc *JWTAuth) Inspect(accessToken string) (*auth.Account, error) {
 	var account *auth.Account
-	lock := svc.mu.NewMutex("inspect-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("inspect-lock-%d", uuid.New()))
 	// 获取锁,保证原子性
 	if err := lock.Lock(); err != nil {
 		return account, err
@@ -159,7 +160,7 @@ func (svc *JWTAuth) Inspect(accessToken string) (*auth.Account, error) {
 
 // StoreToken 存储令牌到Redis
 func (svc *JWTAuth) StoreToken(ctx context.Context, ID int64, name, accessToken string) error {
-	lock := svc.mu.NewMutex("store-token-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("store-token-lock-%d", ID))
 	// 获取锁
 	if err := lock.Lock(); err != nil {
 		return err
@@ -177,7 +178,7 @@ func (svc *JWTAuth) StoreToken(ctx context.Context, ID int64, name, accessToken
 
 // StoreRevoke 从Redis中删除令牌
 func (svc *JWTAuth) StoreRevoke(ctx context.Context, ID int64, name string) error {
-	lock := svc.mu.NewMutex("store-revoke-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("store-revoke-lock-%d", ID))
 	// 获取锁
 	if err := lock.Lock(); err != nil {
 		return err
@@ -195,7 +196,7 @@ func (svc *JWTAuth) StoreRevoke(ctx context.Context, ID int64, name string) erro
 
 // StoreVerify 检查是否在有效期内
 func (svc *JWTAuth) StoreVerify(ID int64, name string, accessToken string) bool {
-	lock := svc.mu.NewMutex("store-verify-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("store-verify-lock-%d", ID))
 	// 获取锁
 	if err := lock.Lock(); err != nil {
 		// 处理获取锁失败的情况
@@ -207,8 +208,8 @@ func (svc *JWTAuth) StoreVerify(ID int64, name string, accessToken string) bool
 }
 
 // Blacklist 将令牌添加到 Redis 黑名单并设置过期时间。
-func (svc *JWTAuth) Blacklist(accessToken string, expiration time.Duration) error {
-	lock := svc.mu.NewMutex("blacklist-lock")
+func (svc *JWTAuth) Blacklist(accessToken string) error {
+	lock := svc.Mu.NewMutex(fmt.Sprintf("blacklist-lock-%d", uuid.New()))
 	// 获取锁
 	if err := lock.Lock(); err != nil {
 		return err
@@ -216,12 +217,12 @@ func (svc *JWTAuth) Blacklist(accessToken string, expiration time.Duration) erro
 	defer lock.Unlock()
 
 	// 将令牌添加到 Redis,并设置过期时间
-	return svc.Client.Set(context.Background(), accessToken, "blacklisted", expiration).Err()
+	return svc.Client.Set(context.Background(), accessToken, "blacklisted", expiry).Err()
 }
 
 // IsBlacklisted 检查令牌是否在黑名单中。
 func (svc *JWTAuth) IsBlacklisted(accessToken string) (bool, error) {
-	lock := svc.mu.NewMutex("is-blacklisted-lock")
+	lock := svc.Mu.NewMutex(fmt.Sprintf("is-blacklisted-lock-%d", uuid.New()))
 	// 获取锁
 	if err := lock.Lock(); err != nil {
 		// 处理获取锁失败的情况
@@ -252,7 +253,7 @@ func (svc *JWTAuth) CleanupExpiredTokens(interval time.Duration) {
 }
 
 func (svc *JWTAuth) cleanupExpiredTokens() {
-	lock := svc.mu.NewMutex("cleanup-expired-tokens-lock")
+	lock := svc.Mu.NewMutex("cleanup-expired-tokens-lock")
 	// 获取锁
 	if err := lock.Lock(); err != nil {
 		// 处理获取锁失败的情况

+ 1 - 1
utils/filter.go

@@ -7,7 +7,7 @@ import (
 	"go-micro.dev/v4/metadata"
 	"golang.org/x/net/context"
 	"net/http"
-	"sghblog.com/paas/authorization-client/utils/authutil"
+	"sghgogs.com/sghblog/authorization-client/utils/authutil"
 	"strconv"
 	"strings"
 	"time"