add service
All checks were successful
Deploy Smart Search Gateway Test / deploy (push) Successful in 2m2s
All checks were successful
Deploy Smart Search Gateway Test / deploy (push) Successful in 2m2s
This commit is contained in:
@@ -28,7 +28,7 @@ func Auth(jwtSecret string) fiber.Handler {
|
||||
return errors.RespondWithError(c, errors.CodeAuthInvalidToken, "Invalid token type", nil)
|
||||
}
|
||||
|
||||
userID, err := strconv.ParseInt(claims.Sub, 10, 64)
|
||||
userID, err := strconv.ParseInt(claims.Subject, 10, 64)
|
||||
if err != nil {
|
||||
return errors.RespondWithError(c, errors.CodeAuthInvalidToken, "Invalid user ID in token", err)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
)
|
||||
|
||||
type Claims struct {
|
||||
Sub string `json:"sub"`
|
||||
Type string `json:"type"`
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user