public class ClientCertificateCredentialBuilder extends AadCredentialBuilderBase<ClientCertificateCredentialBuilder>
ClientCertificateCredential
.ClientCertificateCredential
Constructor and Description |
---|
ClientCertificateCredentialBuilder() |
Modifier and Type | Method and Description |
---|---|
ClientCertificateCredential |
build()
Creates a new
ClientCertificateCredential with the current configurations. |
ClientCertificateCredentialBuilder |
pemCertificate(String certificatePath)
Sets the path of the PEM certificate for authenticating to AAD.
|
ClientCertificateCredentialBuilder |
pfxCertificate(String certificatePath,
String clientCertificatePassword)
Sets the path and password of the PFX certificate for authenticating to AAD.
|
ClientCertificateCredentialBuilder |
regionalAuthority(RegionalAuthority regionalAuthority)
Specifies either the specific regional authority, or use
RegionalAuthority.AUTO_DISCOVER_REGION to
attempt to auto-detect the region. |
ClientCertificateCredentialBuilder |
sendCertificateChain(boolean sendCertificateChain)
Specifies if the x5c claim (public key of the certificate) should be sent as part of the authentication request
and enable subject name / issuer based authentication.
|
ClientCertificateCredentialBuilder |
tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
Configures the persistent shared token cache options and enables the persistent token cache which is disabled
by default.
|
authorityHost, clientId, executorService, tenantId
allowMultiTenantAuthentication, httpClient, httpPipeline, maxRetry, proxyOptions, retryTimeout
public ClientCertificateCredentialBuilder pemCertificate(String certificatePath)
certificatePath
- the PEM file containing the certificatepublic ClientCertificateCredentialBuilder pfxCertificate(String certificatePath, String clientCertificatePassword)
certificatePath
- the password protected PFX file containing the certificateclientCertificatePassword
- the password protecting the PFX filepublic ClientCertificateCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
tokenCachePersistenceOptions
- the token cache configuration optionspublic ClientCertificateCredentialBuilder sendCertificateChain(boolean sendCertificateChain)
sendCertificateChain
- the flag to indicate if certificate chain should be sent as part of authentication
request.public ClientCertificateCredentialBuilder regionalAuthority(RegionalAuthority regionalAuthority)
RegionalAuthority.AUTO_DISCOVER_REGION
to
attempt to auto-detect the region. If unset, a non-regional authority will be used. This argument should be used
only by applications deployed to Azure VMs.regionalAuthority
- the regional authoritypublic ClientCertificateCredential build()
ClientCertificateCredential
with the current configurations.ClientCertificateCredential
with the current configurations.Copyright © 2021 Microsoft Corporation. All rights reserved.