Class AzureActiveDirectoryTokenProvider
- java.lang.Object
-
- com.microsoft.azure.servicebus.security.TokenProvider
-
- com.microsoft.azure.servicebus.security.AzureActiveDirectoryTokenProvider
-
public class AzureActiveDirectoryTokenProvider extends TokenProvider
This is a token provider that obtains tokens from Azure Active Directory. It supports multiple modes of authentication with active directory to obtain tokens.- Since:
- 1.2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AzureActiveDirectoryTokenProvider.AuthenticationCallback
-
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.
-
-