ManagedIdentityApplication Class
- java.
lang. Object - com.
microsoft. aad. msal4j. AbstractApplicationBase - com.
microsoft. aad. msal4j. ManagedIdentityApplication
- com.
- com.
Implements
public class ManagedIdentityApplication
extends AbstractApplicationBase
implements IManagedIdentityApplication
Class to be used to acquire tokens for managed identity. For details see IManagedIdentityApplication
Conditionally thread-safe
Method Summary
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<IAuthentication |
acquireTokenForManagedIdentity(ManagedIdentityParameters managedIdentityParameters)
Acquires tokens from the configured managed identity on an azure resource. |
static Builder |
builder(ManagedIdentityId managedIdentityId)
Creates instance of Builder of Managed |
Managed |
getManagedIdentityId() |
static
Managed |
getManagedIdentitySource()
Returns a ManagedIdentitySourceType value, which is based primarily on environment variables set on the system. |
static
Token |
getSharedTokenCache() |
Methods inherited from AbstractApplicationBase
Methods inherited from java.lang.Object
Method Details
acquireTokenForManagedIdentity
public CompletableFuture
Acquires tokens from the configured managed identity on an azure resource.
Parameters:
Throws:
builder
public static ManagedIdentityApplication.Builder builder(ManagedIdentityId managedIdentityId)
Creates instance of Builder of ManagedIdentityApplication
Parameters:
and provide id if it is user assigned.
Returns:
getManagedIdentityId
public ManagedIdentityId getManagedIdentityId()
getManagedIdentitySource
public static ManagedIdentitySourceType getManagedIdentitySource()
Returns a ManagedIdentitySourceType value, which is based primarily on environment variables set on the system.
Returns:
getSharedTokenCache
public static TokenCache getSharedTokenCache()