Class ManagedIdentityTokenProvider
- java.lang.Object
-
- com.microsoft.azure.servicebus.security.TokenProvider
-
- com.microsoft.azure.servicebus.security.ManagedIdentityTokenProvider
-
public class ManagedIdentityTokenProvider extends TokenProvider
This is a token provider that obtains token using Managed Identity(MI). This token provider automatically detects MI settings.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description ManagedIdentityTokenProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<SecurityToken>
getSecurityTokenAsync(String audience)
Asynchronously gets a security token for the given audience.-
Methods inherited from class com.microsoft.azure.servicebus.security.TokenProvider
createAzureActiveDirectoryTokenProvider, createManagedIdentityTokenProvider, createSharedAccessSignatureTokenProvider, createSharedAccessSignatureTokenProvider
-
-
-
-
Method Detail
-
getSecurityTokenAsync
public CompletableFuture<SecurityToken> getSecurityTokenAsync(String audience)
Description copied from class:TokenProvider
Asynchronously gets a security token for the given audience. Implementations of this method may choose to create a new token for every call or return a cached token. But the token returned must be valid.- Specified by:
getSecurityTokenAsync
in classTokenProvider
- Parameters:
audience
- path of the entity for which this security token is to be presented- Returns:
- an instance of CompletableFuture which returns a
SecurityToken
on completion.
-
-