max furman hace 7 años
padre
commit
7bfd43446a
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      authority/provisioner/jwk.go

+ 2 - 1
authority/provisioner/jwk.go

@@ -122,7 +122,8 @@ func (p *JWK) authorizeToken(token string, audiences []string) (*jwtPayload, err
 	}
 	}
 
 
 	if claims.Subject == "" {
 	if claims.Subject == "" {
-		return nil, errors.New("token subject cannot be empty")
+		return nil, errors.Errorf("invalid token: invalid audience claim (aud); want %s, but got %s",
+			audiences, claims.Audience)
 	}
 	}
 
 
 	return &claims, nil
 	return &claims, nil