public class ClientCredentialFactory extends Object
| Constructor and Description |
|---|
ClientCredentialFactory() |
| Modifier and Type | Method and Description |
|---|---|
static IClientAssertion |
createFromCallback(Callable<String> callable)
Static method to create a
ClientAssertion instance from a provided Callable. |
static IClientAssertion |
createFromCallback(Function<AssertionRequestOptions,String> assertionProvider)
Static method to create a
ClientAssertion instance from a provided Function that
receives AssertionRequestOptions context. |
static IClientCertificate |
createFromCertificate(InputStream pkcs12Certificate,
String password)
Static method to create a
ClientCertificate instance from a password-protected certificate. |
static IClientCertificate |
createFromCertificate(PrivateKey key,
X509Certificate publicKeyCertificate)
Static method to create a
ClientCertificate instance from a private key/public certificate pair. |
static IClientCertificate |
createFromCertificateChain(PrivateKey key,
List<X509Certificate> publicKeyCertificateChain)
Static method to create a
ClientCertificate instance from a certificate chain. |
static IClientAssertion |
createFromClientAssertion(String clientAssertion)
Static method to create a
ClientAssertion instance from a JWT token encoded as a base64 URL encoded string. |
static IClientSecret |
createFromSecret(String secret)
Static method to create a
ClientSecret instance from a client secret |
public static IClientSecret createFromSecret(String secret)
ClientSecret instance from a client secretsecret - secret of application requesting a tokenClientSecretpublic static IClientCertificate createFromCertificate(InputStream pkcs12Certificate, String password) throws CertificateException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, NoSuchProviderException, IOException
ClientCertificate instance from a password-protected certificate.pkcs12Certificate - InputStream containing PCKS12 formatted certificatepassword - certificate passwordClientCertificateCertificateExceptionUnrecoverableKeyExceptionNoSuchAlgorithmExceptionKeyStoreExceptionNoSuchProviderExceptionIOExceptionpublic static IClientCertificate createFromCertificate(PrivateKey key, X509Certificate publicKeyCertificate)
ClientCertificate instance from a private key/public certificate pair.key - RSA private key to sign the assertion.publicKeyCertificate - x509 public certificate used for thumbprintClientCertificatepublic static IClientCertificate createFromCertificateChain(PrivateKey key, List<X509Certificate> publicKeyCertificateChain)
ClientCertificate instance from a certificate chain.key - RSA private key to sign the assertion.publicKeyCertificateChain - ordered with the user's certificate first followed by zero or more certificate authoritiesClientCertificatepublic static IClientAssertion createFromClientAssertion(String clientAssertion)
ClientAssertion instance from a JWT token encoded as a base64 URL encoded string.clientAssertion - JWT token encoded as a base64 URL encoded stringClientAssertionpublic static IClientAssertion createFromCallback(Callable<String> callable)
ClientAssertion instance from a provided Callable.
The callable will be invoked each time the assertion is needed, allowing for dynamic
generation of assertions.callable - Callable that produces a JWT token encoded as a base64 URL encoded stringClientAssertion that will invoke the callable each time assertion() is calledNullPointerException - if callable is nullpublic static IClientAssertion createFromCallback(Function<AssertionRequestOptions,String> assertionProvider)
ClientAssertion instance from a provided Function that
receives AssertionRequestOptions context. The function will be invoked each time
the assertion is needed, allowing for dynamic generation of assertions based on the
request context (such as the FMI path in agent identity scenarios).assertionProvider - Function that receives AssertionRequestOptions and produces
a JWT token encoded as a base64 URL encoded stringClientAssertion that will invoke the function each time assertion() is calledNullPointerException - if assertionProvider is nullCopyright © 2013–2026. All rights reserved.