IClientCertificate Interface

Implements

public interface IClientCertificate
extends IClientCredential

Credential type containing X509 public certificate and RSA private key.

For more details, see https://aka.ms/msal4j-client-credentials

Method Summary

Modifier and Type Method and Description
abstract java.util.List<java.lang.String> getEncodedPublicKeyCertificateChain()

Base64 encoded public certificate.

abstract java.security.PrivateKey privateKey()

Returns private key of the credential.

abstract java.lang.String publicCertificateHash()

Base64 encoded hash of the the public certificate.

Method Details

getEncodedPublicKeyCertificateChain

public abstract List getEncodedPublicKeyCertificateChain()

Base64 encoded public certificate.

Returns:

base64 encoded string

Throws:

java.security.cert.CertificateEncodingException - if an encoding error occurs

privateKey

public abstract PrivateKey privateKey()

Returns private key of the credential.

Returns:

private key.

publicCertificateHash

public abstract String publicCertificateHash()

Base64 encoded hash of the the public certificate.

Returns:

base64 encoded string

Throws:

java.security.cert.CertificateEncodingException - if an encoding error occurs
java.security.NoSuchAlgorithmException - if an encoding error occurs

Applies to