AzureActiveDirectoryTokenProvider Class
- java.
lang. Object - TokenProvider
- com.
microsoft. azure. servicebus. security. AzureActiveDirectoryTokenProvider
- com.
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.
Constructor Summary
Constructor | Description |
---|---|
AzureActiveDirectoryTokenProvider(AuthenticationContext authenticationContext, AsymmetricKeyCredential asymmetricKeyCredential) |
Creates a token provider that authenticates with active directory using certificate. |
AzureActiveDirectoryTokenProvider(AuthenticationContext authenticationContext, ClientCredential clientCredential) |
Creates a token provider that authenticates with active directory using client secret. |
AzureActiveDirectoryTokenProvider(AuthenticationContext authenticationContext, String clientId, String userName, String password) |
Creates a token provider that authenticates with active directory using username and password. |
Method Summary
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Security |
getSecurityTokenAsync(String audience) |
Inherited Members
Constructor Details
AzureActiveDirectoryTokenProvider
public AzureActiveDirectoryTokenProvider(AuthenticationContext authenticationContext, AsymmetricKeyCredential asymmetricKeyCredential)
Creates a token provider that authenticates with active directory using certificate.
Parameters:
AzureActiveDirectoryTokenProvider
public AzureActiveDirectoryTokenProvider(AuthenticationContext authenticationContext, ClientCredential clientCredential)
Creates a token provider that authenticates with active directory using client secret.
Parameters:
AzureActiveDirectoryTokenProvider
public AzureActiveDirectoryTokenProvider(AuthenticationContext authenticationContext, String clientId, String userName, String password)
Creates a token provider that authenticates with active directory using username and password.
Parameters:
Method Details
getSecurityTokenAsync
public CompletableFuture
Parameters:
Applies to
Azure SDK for Java