ClientCredentialFactory Class
- java.
lang. Object - com.
microsoft. aad. msal4j. ClientCredentialFactory
- com.
public class ClientCredentialFactory
Factory for creating client credentials used in confidential client flows. For more details, see https://aka.ms/msal4j-client-credentials
Constructor Summary
Constructor | Description | |
---|---|---|
ClientCredentialFactory() |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
IClient |
createFromCallback(Callable<String> callable)
Static method to create a ClientAssertion instance from a provided Callable. |
static
IClient |
createFromCertificate(InputStream pkcs12Certificate, String password)
Static method to create a ClientCertificate instance from a password-protected certificate. |
static
IClient |
createFromCertificate(PrivateKey key, X509Certificate publicKeyCertificate)
Static method to create a ClientCertificate instance from a private key/public certificate pair. |
static
IClient |
createFromCertificateChain(PrivateKey key, List<X509Certificate> publicKeyCertificateChain)
Static method to create a ClientCertificate instance from a certificate chain. |
static
IClient |
createFromClientAssertion(String clientAssertion)
Static method to create a ClientAssertion instance from a JWT token encoded as a base64 URL encoded string. |
static
IClient |
createFromSecret(String secret)
Static method to create a ClientSecret instance from a client secret |
Methods inherited from java.lang.Object
Constructor Details
ClientCredentialFactory
public ClientCredentialFactory()
Method Details
createFromCallback
public static IClientAssertion createFromCallback(Callable
Static method to create a ClientAssertion instance from a provided Callable.
Parameters:
Returns:
Throws:
createFromCertificate
public static IClientCertificate createFromCertificate(InputStream pkcs12Certificate, String password)
Static method to create a ClientCertificate instance from a password-protected certificate.
Parameters:
Returns:
Throws:
createFromCertificate
public static IClientCertificate createFromCertificate(PrivateKey key, X509Certificate publicKeyCertificate)
Static method to create a ClientCertificate instance from a private key/public certificate pair.
Parameters:
Returns:
createFromCertificateChain
public static IClientCertificate createFromCertificateChain(PrivateKey key, List
Static method to create a ClientCertificate instance from a certificate chain.
Parameters:
Returns:
createFromClientAssertion
public static IClientAssertion createFromClientAssertion(String clientAssertion)
Static method to create a ClientAssertion instance from a JWT token encoded as a base64 URL encoded string.
Parameters:
Returns:
createFromSecret
public static IClientSecret createFromSecret(String secret)
Static method to create a ClientSecret instance from a client secret
Parameters:
Returns: