ClientCertificateCredential Class

  • java.lang.Object
    • com.azure.identity.ClientCertificateCredential

Implements

public class ClientCertificateCredential
implements TokenCredential

An AAD credential that acquires a token with a client certificate for an AAD application.

Sample: Construct a simple ClientCertificateCredential

ClientCertificateCredential credential1 = new ClientCertificateCredentialBuilder()
     .tenantId(tenantId)
     .clientId(clientId)
     .pemCertificate("<PATH-TO-PEM-CERTIFICATE>")
     .build();

Sample: Construct a ClientCertificateCredential behind a proxy

ClientCertificateCredential credential2 = new ClientCertificateCredentialBuilder()
     .tenantId(tenantId)
     .clientId(clientId)
     .pfxCertificate("<PATH-TO-PFX-CERTIFICATE>", "P@s$w0rd")
     .proxyOptions(new ProxyOptions(Type.HTTP, new InetSocketAddress("10.21.32.43", 5465)))
     .build();

Method Summary

Modifier and Type Method and Description

Mono<AccessToken>

getToken(TokenRequestContext request)
AccessToken getTokenSync(TokenRequestContext request)

Methods inherited from java.lang.Object

Method Details

getToken

public Mono getToken(TokenRequestContext request)

Parameters:

request

getTokenSync

public AccessToken getTokenSync(TokenRequestContext request)

Parameters:

request

Applies to