finish: gorm序列化
This commit is contained in:
@@ -24,8 +24,8 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
|
||||
func (svcCxt *ServiceContext) ParseJwtToken(r *http.Request) (jwt.MapClaims, error) {
|
||||
AuthKey := r.Header.Get("Authorization")
|
||||
if len(AuthKey) <= 50 {
|
||||
return nil, errors.New(fmt.Sprint("Error parsing token, len:", len(AuthKey)))
|
||||
if AuthKey == "" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
token, err := jwt.Parse(AuthKey, func(token *jwt.Token) (interface{}, error) {
|
||||
|
||||
Reference in New Issue
Block a user