Package com.azure.identity
Class CredentialBuilderBase<T extends CredentialBuilderBase<T>>
- java.lang.Object
-
- com.azure.identity.CredentialBuilderBase<T>
-
- Type Parameters:
T- the type of the credential builder
- Direct Known Subclasses:
AadCredentialBuilderBase,AzureCliCredentialBuilder,AzurePowerShellCredentialBuilder,DefaultAzureCredentialBuilder,EnvironmentCredentialBuilder,IntelliJCredentialBuilder,ManagedIdentityCredentialBuilder,VisualStudioCodeCredentialBuilder
public abstract class CredentialBuilderBase<T extends CredentialBuilderBase<T>> extends Object
The base class for all the credential builders.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Tconfiguration(com.azure.core.util.Configuration configuration)Sets the configuration store that is used during construction of the credential.ThttpClient(com.azure.core.http.HttpClient client)Sets the HTTP client to use for sending and receiving requests to and from the service.ThttpPipeline(com.azure.core.http.HttpPipeline httpPipeline)Specifies the HttpPipeline to send all requests.TmaxRetry(int maxRetry)Specifies the max number of retries when an authentication request fails.TproxyOptions(com.azure.core.http.ProxyOptions proxyOptions)Deprecated.Configure the proxy options on theHttpClientinstead and then set that client on the credential usinghttpClient(HttpClient).TretryTimeout(Function<Duration,Duration> retryTimeout)Specifies a Function to calculate seconds of timeout on every retried request.
-
-
-
Method Detail
-
maxRetry
public T maxRetry(int maxRetry)
Specifies the max number of retries when an authentication request fails.- Parameters:
maxRetry- the number of retries- Returns:
- An updated instance of this builder with the max retry set as specified.
-
retryTimeout
public T retryTimeout(Function<Duration,Duration> retryTimeout)
Specifies a Function to calculate seconds of timeout on every retried request.- Parameters:
retryTimeout- the Function that returns a timeout in seconds given the number of retry- Returns:
- An updated instance of this builder with the retry timeout set as specified.
-
proxyOptions
@Deprecated public T proxyOptions(com.azure.core.http.ProxyOptions proxyOptions)
Deprecated.Configure the proxy options on theHttpClientinstead and then set that client on the credential usinghttpClient(HttpClient).Specifies the options for proxy configuration.- Parameters:
proxyOptions- the options for proxy configuration- Returns:
- An updated instance of this builder with the proxy options set as specified.
-
httpPipeline
public T httpPipeline(com.azure.core.http.HttpPipeline httpPipeline)
Specifies the HttpPipeline to send all requests. This setting overrides the others.- Parameters:
httpPipeline- the HttpPipeline to send all requests- Returns:
- An updated instance of this builder with the http pipeline set as specified.
-
httpClient
public T httpClient(com.azure.core.http.HttpClient client)
Sets the HTTP client to use for sending and receiving requests to and from the service.- Parameters:
client- The HTTP client to use for requests.- Returns:
- An updated instance of this builder with the http client set as specified.
- Throws:
NullPointerException- Ifclientisnull.
-
configuration
public T configuration(com.azure.core.util.Configuration configuration)
Sets the configuration store that is used during construction of the credential. The default configuration store is a clone of theglobal configuration store.- Parameters:
configuration- The configuration store used to load Env variables and/or properties from.- Returns:
- An updated instance of this builder with the configuration store set as specified.
-
-