I understand that we use below code to generate access token for JWT authentication:
OAuth.OAuthToken oAuthToken = apiClient.requestJWTUserToken(
configuration.getUserId(),
configuration.getImpersonatedUserId(),
scopes,
privateKeyBytes,
TOKEN_EXPIRATION_IN_SECONDS);
4th parameter represents private key of RSA key pair.
But how to send request if we have multiple RSA key pairs associated to an application?
And as mentioned in documentation the signature should include header, payload and (public + private). But i couldn't understand why we are sending only private key from above code?
I am expecting answers to following
- the code to send a request when we have multiple RSA key pairs and
- why we have only private key when sending req from code.