Package com.azure.identity
Class ChainedTokenCredentialBuilder
- java.lang.Object
-
- com.azure.identity.ChainedTokenCredentialBuilder
-
public class ChainedTokenCredentialBuilder extends Object
Fluent credential builder for instantiating aChainedTokenCredential
.- See Also:
ChainedTokenCredential
-
-
Constructor Summary
Constructors Constructor Description ChainedTokenCredentialBuilder()
Creates an instance of the builder to config the credential.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChainedTokenCredentialBuilder
addAll(Collection<? extends com.azure.core.credential.TokenCredential> credentials)
Adds all of the credentials in the specified collection at the end of this chain, as if by callingaddLast(TokenCredential)
on each one, in the order that they are returned by the collection's iterator.ChainedTokenCredentialBuilder
addFirst(com.azure.core.credential.TokenCredential credential)
Adds a credential to try to authenticate at the front of the chain.ChainedTokenCredentialBuilder
addLast(com.azure.core.credential.TokenCredential credential)
Adds a credential to try to authenticate at the last of the chain.ChainedTokenCredential
build()
Creates a newChainedTokenCredential
with the current configurations.
-
-
-
Method Detail
-
addFirst
public ChainedTokenCredentialBuilder addFirst(com.azure.core.credential.TokenCredential credential)
Adds a credential to try to authenticate at the front of the chain.- Parameters:
credential
- the credential to be added to the front of chain- Returns:
- the ChainedTokenCredential itself
-
addLast
public ChainedTokenCredentialBuilder addLast(com.azure.core.credential.TokenCredential credential)
Adds a credential to try to authenticate at the last of the chain.- Parameters:
credential
- the credential to be added to the end of chain- Returns:
- the ChainedTokenCredential itself
-
addAll
public ChainedTokenCredentialBuilder addAll(Collection<? extends com.azure.core.credential.TokenCredential> credentials)
Adds all of the credentials in the specified collection at the end of this chain, as if by callingaddLast(TokenCredential)
on each one, in the order that they are returned by the collection's iterator.- Parameters:
credentials
- the collection of credentials to be appended to the chain.- Returns:
- An updated instance of the builder.
-
build
public ChainedTokenCredential build()
Creates a newChainedTokenCredential
with the current configurations.- Returns:
- a
ChainedTokenCredential
with the current configurations.
-
-