Add support to pass in JWS as a type for encode