public class OnBehalfOfCredentialBuilder extends AadCredentialBuilderBase<OnBehalfOfCredentialBuilder>
OnBehalfOfCredential.OnBehalfOfCredential| Constructor and Description |
|---|
OnBehalfOfCredentialBuilder() |
| Modifier and Type | Method and Description |
|---|---|
OnBehalfOfCredential |
build()
Creates a new
OnBehalfOfCredential with the current configurations. |
OnBehalfOfCredentialBuilder |
clientCertificatePassword(String clientCertificatePassword)
Sets the password of the client certificate for authenticating to AAD.
|
OnBehalfOfCredentialBuilder |
clientSecret(String clientSecret)
Sets the client secret for the authentication.
|
OnBehalfOfCredentialBuilder |
pemCertificate(String pemCertificatePath)
Sets the path of the PEM certificate for authenticating to AAD.
|
OnBehalfOfCredentialBuilder |
pfxCertificate(String pfxCertificatePath)
Sets the path and password of the PFX certificate for authenticating to AAD.
|
OnBehalfOfCredentialBuilder |
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.
|
OnBehalfOfCredentialBuilder |
tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
Configures the persistent shared token cache options and enables the persistent token cache which is disabled
by default.
|
OnBehalfOfCredentialBuilder |
userAssertion(String userAssertion)
Configure the User Assertion Scope to be used for OnBehalfOf Authentication request.
|
authorityHost, clientId, executorService, tenantIdconfiguration, httpClient, httpPipeline, maxRetry, proxyOptions, retryTimeoutpublic OnBehalfOfCredentialBuilder clientSecret(String clientSecret)
clientSecret - the secret value of the AAD application.public OnBehalfOfCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
tokenCachePersistenceOptions - the token cache configuration optionspublic OnBehalfOfCredentialBuilder pemCertificate(String pemCertificatePath)
pemCertificatePath - the PEM file containing the certificatepublic OnBehalfOfCredentialBuilder pfxCertificate(String pfxCertificatePath)
pfxCertificatePath - the password protected PFX file containing the certificatepublic OnBehalfOfCredentialBuilder clientCertificatePassword(String clientCertificatePassword)
clientCertificatePassword - the password protecting the certificatepublic OnBehalfOfCredentialBuilder sendCertificateChain(boolean sendCertificateChain)
sendCertificateChain - the flag to indicate if certificate chain should be sent as part of authentication
request.public OnBehalfOfCredentialBuilder userAssertion(String userAssertion)
userAssertion - the user assertion access token to be used for On behalf Of authentication flowpublic OnBehalfOfCredential build()
OnBehalfOfCredential with the current configurations.OnBehalfOfCredential with the current configurations.IllegalArgumentException - if eiter both the client secret and certificate are configured or none of them
are configured.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.