public final class AsymmetricKeyCredential extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_KEYSIZE_IN_BITS |
| Modifier and Type | Method and Description |
|---|---|
static AsymmetricKeyCredential |
create(String clientId,
InputStream pkcs12Certificate,
String password)
Static method to create KeyCredential instance.
|
static AsymmetricKeyCredential |
create(String clientId,
PrivateKey key,
X509Certificate publicCertificate)
Static method to create KeyCredential instance.
|
String |
getClientId()
Gets the identifier of the client requesting the token.
|
Key |
getKey()
Returns private key of the credential.
|
String |
getPublicCertificate()
Base64 encoded public certificate.
|
String |
getPublicCertificateHash()
Base64 encoded hash of the the public certificate.
|
public static final int MIN_KEYSIZE_IN_BITS
public String getClientId()
public String getPublicCertificateHash() throws CertificateEncodingException, NoSuchAlgorithmException
CertificateEncodingExceptionNoSuchAlgorithmExceptionpublic String getPublicCertificate() throws CertificateEncodingException, NoSuchAlgorithmException
CertificateEncodingExceptionNoSuchAlgorithmExceptionpublic Key getKey()
public static AsymmetricKeyCredential create(String clientId, InputStream pkcs12Certificate, String password) throws KeyStoreException, NoSuchProviderException, NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, UnrecoverableKeyException
clientId - Identifier of the client requesting the token.pkcs12Certificate - PKCS12 certificate stream containing public and private key.
Caller is responsible to handling the inputstream.password - certificate passwordKeyStoreExceptionNoSuchProviderExceptionNoSuchAlgorithmExceptionCertificateExceptionFileNotFoundExceptionIOExceptionUnrecoverableKeyExceptionpublic static AsymmetricKeyCredential create(String clientId, PrivateKey key, X509Certificate publicCertificate)
clientId - Identifier of the client requesting the token.key - RSA private key to sign the assertion.publicCertificate - Public certificate used for thumb print.Copyright © 2013–2015. All rights reserved.