|
@ -77,7 +77,7 @@ func ParseToken(ctx iris.Context) (*global.User, bool) { |
|
|
roleId, ok4 := mapClaims["roleId"].(float64) |
|
|
roleId, ok4 := mapClaims["roleId"].(float64) |
|
|
|
|
|
|
|
|
if !ok1 || !ok2 || !ok3 || !ok4 { |
|
|
if !ok1 || !ok2 || !ok3 || !ok4 { |
|
|
supports.Error(ctx, iris.StatusInternalServerError, supports.TokenParseFailur, nil) |
|
|
|
|
|
|
|
|
supports.Error(ctx, iris.StatusUnauthorized, supports.TokenParseFailur, nil) |
|
|
return nil, false |
|
|
return nil, false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -101,7 +101,7 @@ func ParseTokenAndSignature(ctx iris.Context) (*global.User, string, bool) { |
|
|
roleId, ok4 := mapClaims["roleId"].(float64) |
|
|
roleId, ok4 := mapClaims["roleId"].(float64) |
|
|
|
|
|
|
|
|
if !ok1 || !ok2 || !ok3 || !ok4 { |
|
|
if !ok1 || !ok2 || !ok3 || !ok4 { |
|
|
supports.Error(ctx, iris.StatusInternalServerError, supports.TokenParseFailur, nil) |
|
|
|
|
|
|
|
|
supports.Error(ctx, iris.StatusUnauthorized, supports.TokenParseFailur, nil) |
|
|
return nil, "", false |
|
|
return nil, "", false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|