public class JWTUtils extends Object
| Constructor and Description |
|---|
JWTUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateJWTAssertion(String publicKeyFilename,
String privateKeyFilename,
String oAuthBasePath,
String clientId,
String userId,
long expiresIn)
Helper method to create a JWT token for the JWT flow
|
static String |
generateJWTAssertionFromByteArray(byte[] rsaPrivateKey,
String oAuthBasePath,
String clientId,
String userId,
long expiresIn,
String scopes)
Helper method to create a JWT token for the JWT flow
|
public static String generateJWTAssertionFromByteArray(byte[] rsaPrivateKey, String oAuthBasePath, String clientId, String userId, long expiresIn, String scopes) throws IllegalArgumentException, com.auth0.jwt.exceptions.JWTCreationException, IOException
rsaPrivateKey - the byte contents of the RSA private keyoAuthBasePath - DocuSign OAuth base path (account-d.docusign.com for the developer sandbox
and account.docusign.com for the production platform)clientId - DocuSign OAuth Client Id (AKA Integrator Key)userId - DocuSign user Id to be impersonated (This is a UUID)expiresIn - number of seconds remaining before the JWT assertion is considered as invalidscopes - space-separated string that represents the list of scopes to grant to the OAuth token.IllegalArgumentException - if one of the arguments is invalidcom.auth0.jwt.exceptions.JWTCreationException - if not able to create a JWT token from the input parametersIOException - if there is an issue with either the public or private filepublic static String generateJWTAssertion(String publicKeyFilename, String privateKeyFilename, String oAuthBasePath, String clientId, String userId, long expiresIn) throws com.auth0.jwt.exceptions.JWTCreationException, IOException
publicKeyFilename - the filename of the RSA public keyprivateKeyFilename - the filename of the RSA private keyoAuthBasePath - DocuSign OAuth base path (account-d.docusign.com for the developer sandbox
and account.docusign.com for the production platform)clientId - DocuSign OAuth Client Id (AKA Integrator Key)userId - DocuSign user Id to be impersonated (This is a UUID)expiresIn - number of seconds remaining before the JWT assertion is considered as invalidcom.auth0.jwt.exceptions.JWTCreationException - if not able to create a JWT token from the input parametersIOException - if there is an issue with either the public or private fileCopyright © 2018. All rights reserved.