Package com.cybersource.authsdk.jwt
Class KeyCertificateGenerator
java.lang.Object
com.cybersource.authsdk.jwt.KeyCertificateGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninitializeCertificate(MerchantConfig merchantConfig) initializePrivateKey(MerchantConfig merchantConfig)
-
Constructor Details
-
KeyCertificateGenerator
public KeyCertificateGenerator()
-
-
Method Details
-
initializeCertificate
public X509Certificate initializeCertificate(MerchantConfig merchantConfig) throws CertificateException, NoSuchAlgorithmException, IOException, KeyStoreException, ConfigException, Exception - Parameters:
merchantConfig- -contains merchant information.- Returns:
- certificate which will be used to generate token.
- Throws:
CertificateException- - if certificate is missing or wrong.NoSuchAlgorithmException- - if algorithm is not available.IOException- - if file is not found.KeyStoreException- - if file is not available in key store or wrong.ConfigException- - if some values is missing or wrong for merchant.Exception- - if some other exception will happen.
-
initializePrivateKey
public RSAPrivateKey initializePrivateKey(MerchantConfig merchantConfig) throws CertificateException, NoSuchAlgorithmException, IOException, KeyStoreException, ConfigException, Exception - Parameters:
merchantConfig- - contains merchant information.- Returns:
- certificate which will be used to generate token.
- Throws:
CertificateException- if certificate is missing or wrong.NoSuchAlgorithmException- if algorithm is not available.IOException- if file is not found.KeyStoreException- if file is not available in key store or wrong.ConfigException- if some values is missing or wrong for merchant.Exception- if some other exception will happen.
-