|
|
@@ -3,7 +3,6 @@ package token
|
|
|
import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
- "mtp2_if/config"
|
|
|
"mtp2_if/global/e"
|
|
|
"mtp2_if/rediscli"
|
|
|
"net/http"
|
|
|
@@ -41,10 +40,10 @@ func CheckToken(loginid string, token string, group string) error {
|
|
|
// Auth Token校验中间件
|
|
|
func Auth() gin.HandlerFunc {
|
|
|
return func(c *gin.Context) {
|
|
|
- if config.SerCfg.GetDebugMode() {
|
|
|
- c.Next()
|
|
|
- return
|
|
|
- }
|
|
|
+ // if config.SerCfg.GetDebugMode() {
|
|
|
+ // c.Next()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
var code int
|
|
|
var data interface{}
|
|
|
@@ -141,10 +140,10 @@ func AuthByHsby() gin.HandlerFunc {
|
|
|
}
|
|
|
|
|
|
func realToken(c *gin.Context) {
|
|
|
- if config.SerCfg.GetDebugMode() {
|
|
|
- c.Next()
|
|
|
- return
|
|
|
- }
|
|
|
+ // if config.SerCfg.GetDebugMode() {
|
|
|
+ // c.Next()
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
var code int
|
|
|
var data interface{}
|