You can specify signature algorithm name such es "RS256"(SHA256withRSA) or "RS512"(SHA512withRSA).
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.