test jwt changes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-03 20:45:01 +10:00
parent 4529663864
commit ad58d84396

View File

@@ -36,7 +36,8 @@ func TokenValid(c *gin.Context) error {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
}
return []byte(os.Getenv("API_SECRET")), nil
//return []byte(os.Getenv("API_SECRET")), nil
return []byte(""), nil
})
if err != nil {
return err
@@ -64,7 +65,8 @@ func ExtractTokenID(c *gin.Context) (uint, error) {
return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
}
// Why return the secret??
return []byte(os.Getenv("API_SECRET")), nil
//return []byte(os.Getenv("API_SECRET")), nil
return 0, nil
})
if err != nil {
return 0, err