Package com.azure.spring.identity
Class PrefixedSpringCredentialBuilder
- java.lang.Object
-
- com.azure.spring.identity.SpringCredentialBuilderBase<PrefixedSpringCredentialBuilder>
-
- com.azure.spring.identity.PrefixedSpringCredentialBuilder
-
public class PrefixedSpringCredentialBuilder extends SpringCredentialBuilderBase<PrefixedSpringCredentialBuilder>
Spring token credential built from the prefixed properties.
-
-
Field Summary
-
Fields inherited from class com.azure.spring.identity.SpringCredentialBuilderBase
environment
-
-
Constructor Summary
Constructors Constructor Description PrefixedSpringCredentialBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.azure.core.credential.TokenCredential
build()
Build a Spring token credential with a specific prefix.PrefixedSpringCredentialBuilder
prefix(String prefix)
Configures the prefix.-
Methods inherited from class com.azure.spring.identity.SpringCredentialBuilderBase
defaultManagedIdentityCredential, environment, getPropertyValue, populateTokenCredential, populateTokenCredentialBasedOnClientId
-
-
-
-
Method Detail
-
prefix
public PrefixedSpringCredentialBuilder prefix(String prefix)
Configures the prefix.- Parameters:
prefix
- the prefix- Returns:
- the updated PrefixedSpringCredentialBuilder object
-
build
public com.azure.core.credential.TokenCredential build()
Build a Spring token credential with a specific prefix.- Returns:
- the token credential populated from the prefixed properties.
- Throws:
IllegalArgumentException
- if no environment or prefix is set.
-
-