Skip to content

Commit 608d45a

Browse files
authored
Merge pull request #32 from DerickIT/patch-2
fix: fmt.Errorf
2 parents aec7292 + cf32b25 commit 608d45a

File tree

1 file changed

+1
-1
lines changed
  • src/infrastructure/security/jwt

1 file changed

+1
-1
lines changed

src/infrastructure/security/jwt/jwt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func GetClaimsAndVerifyToken(tokenString string, tokenType string) (jwt.MapClaim
9696

9797
token, err := jwt.Parse(tokenString, func(token *jwt.Token) (any, error) {
9898
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
99-
return nil, domainErrors.NewAppError(errors.New(fmt.Sprintf("unexpected signing method: %v", token.Header["alg"])), domainErrors.NotAuthenticated)
99+
return nil, domainErrors.NewAppError(fmt.Errorf("unexpected signing method: %v", token.Header["alg"]), domainErrors.NotAuthenticated)
100100
}
101101
return []byte(secretKey), nil
102102
})

0 commit comments

Comments
 (0)