Package com.azure.spring.identity
Class SpringCredentialBuilderBase<T extends SpringCredentialBuilderBase<T>>
- java.lang.Object
-
- com.azure.spring.identity.SpringCredentialBuilderBase<T>
-
- Direct Known Subclasses:
DefaultSpringCredentialBuilder
,PrefixedSpringCredentialBuilder
public abstract class SpringCredentialBuilderBase<T extends SpringCredentialBuilderBase<T>> extends Object
The base Spring credential builder.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.core.env.Environment
environment
The Environment.
-
Constructor Summary
Constructors Constructor Description SpringCredentialBuilderBase()
Creates a new instance ofSpringCredentialBuilderBase
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.azure.identity.ManagedIdentityCredential
defaultManagedIdentityCredential()
Gets the default ManagedIdentityCredential.T
environment(org.springframework.core.env.Environment environment)
Configures the environment.protected String
getPropertyValue(String prefix, String propertyKey)
Gets a property value from the environment.protected com.azure.core.credential.TokenCredential
populateTokenCredential(String prefix)
Populates and constructs aTokenCredential
.protected com.azure.core.credential.TokenCredential
populateTokenCredentialBasedOnClientId(String prefix)
Populates and constructs aTokenCredential
based on a client ID.
-
-
-
Constructor Detail
-
SpringCredentialBuilderBase
public SpringCredentialBuilderBase()
Creates a new instance ofSpringCredentialBuilderBase
.
-
-
Method Detail
-
environment
public T environment(org.springframework.core.env.Environment environment)
Configures the environment.- Parameters:
environment
- the environment- Returns:
- the updated credential builder
-
populateTokenCredential
protected com.azure.core.credential.TokenCredential populateTokenCredential(String prefix)
Populates and constructs aTokenCredential
.- Parameters:
prefix
- the prefix- Returns:
- A new TokenCredential
-
populateTokenCredentialBasedOnClientId
protected com.azure.core.credential.TokenCredential populateTokenCredentialBasedOnClientId(String prefix)
Populates and constructs aTokenCredential
based on a client ID.- Parameters:
prefix
- the prefix- Returns:
- A new TokenCredential
-
defaultManagedIdentityCredential
protected com.azure.identity.ManagedIdentityCredential defaultManagedIdentityCredential()
Gets the default ManagedIdentityCredential.- Returns:
- the default ManagedIdentityCredential
-
-