In our project, we are invoking a docusign API Service for which a JWT OAuth access token has to be generated. My requirement is that i need to sign the below message using the RSA private key with SHA256 algorithm.
Which version of Pega are you using? In Pega 8.x, we have OOTB means to generate JWT tokens using a combination of Token Profile and pxGenerateJWT activity. You just need to specify the signature algorithm in the Token Profile and the activity generates the JWT token accordingly.