You can specify signature algorithm name such as "RS256"(SHA256withRSA), "RS512"(SHA512withRSA), "PS256"(SHA256withRSAPSS), "PS512"(SHA512withRSAPSS).
If it isn't un-supported value, it will raise an error.
If malformed JWS Head is specified, it will raise an error.
As for JWS signature verification, please see this sample.