Freigeben über


ManagedIdentityApplication Class

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<IAuthenticationResult> acquireTokenForManagedIdentity(ManagedIdentityParameters managedIdentityParameters)

Acquires tokens from the configured managed identity on an azure resource.

static Builder builder(ManagedIdentityId managedIdentityId)

Creates instance of Builder of ManagedIdentityApplication

ManagedIdentityId getManagedIdentityId()
static ManagedIdentitySourceType getManagedIdentitySource()

Returns a ManagedIdentitySourceType value, which is based primarily on environment variables set on the system.

static TokenCache getSharedTokenCache()

Methods inherited from AbstractApplicationBase

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

acquireTokenForManagedIdentity

public CompletableFuture acquireTokenForManagedIdentity(ManagedIdentityParameters managedIdentityParameters)

Acquires tokens from the configured managed identity on an azure resource.

Parameters:

managedIdentityParameters

Throws:

java.lang.Exception

builder

public static ManagedIdentityApplication.Builder builder(ManagedIdentityId managedIdentityId)

Creates instance of Builder of ManagedIdentityApplication

Parameters:

managedIdentityId - ManagedIdentityId to specify if System Assigned or User Assigned
                      and provide id if it is user assigned.

Returns:

instance of Builder of ManagedIdentityApplication

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:

ManagedIdentitySourceType enum for source type

getSharedTokenCache

public static TokenCache getSharedTokenCache()

Applies to