Class AzureIdentityAccessTokenProvider
java.lang.Object
com.microsoft.kiota.authentication.AzureIdentityAccessTokenProvider
- All Implemented Interfaces:
com.microsoft.kiota.authentication.AccessTokenProvider
public class AzureIdentityAccessTokenProvider
extends Object
implements com.microsoft.kiota.authentication.AccessTokenProvider
Implementation of AccessTokenProvider that supports implementations of TokenCredential from Azure.Identity.
-
Constructor Summary
ConstructorsConstructorDescriptionAzureIdentityAccessTokenProvider(com.azure.core.credential.TokenCredential tokenCredential, String[] allowedHosts, ObservabilityOptions observabilityOptions, boolean isCaeEnabled, String... scopes) Creates a new instance of AzureIdentityAccessTokenProvider.AzureIdentityAccessTokenProvider(com.azure.core.credential.TokenCredential tokenCredential, String[] allowedHosts, ObservabilityOptions observabilityOptions, String... scopes) Creates a new instance of AzureIdentityAccessTokenProvider.AzureIdentityAccessTokenProvider(com.azure.core.credential.TokenCredential tokenCredential, String[] allowedHosts, String... scopes) Creates a new instance of AzureIdentityAccessTokenProvider. -
Method Summary
Modifier and TypeMethodDescriptioncom.microsoft.kiota.authentication.AllowedHostsValidatorgetAuthorizationToken(URI uri, Map<String, Object> additionalAuthenticationContext)
-
Constructor Details
-
AzureIdentityAccessTokenProvider
public AzureIdentityAccessTokenProvider(@Nonnull com.azure.core.credential.TokenCredential tokenCredential, @Nonnull String[] allowedHosts, @Nonnull String... scopes) Creates a new instance of AzureIdentityAccessTokenProvider.- Parameters:
tokenCredential- The Azure.Identity.TokenCredential implementation to use.allowedHosts- The list of allowed hosts for which to request access tokens.scopes- The scopes to request access tokens for.
-
AzureIdentityAccessTokenProvider
public AzureIdentityAccessTokenProvider(@Nonnull com.azure.core.credential.TokenCredential tokenCredential, @Nonnull String[] allowedHosts, @Nullable ObservabilityOptions observabilityOptions, @Nonnull String... scopes) Creates a new instance of AzureIdentityAccessTokenProvider.- Parameters:
tokenCredential- The Azure.Identity.TokenCredential implementation to use.allowedHosts- The list of allowed hosts for which to request access tokens.observabilityOptions- The observability options to use.scopes- The scopes to request access tokens for.
-
AzureIdentityAccessTokenProvider
public AzureIdentityAccessTokenProvider(@Nonnull com.azure.core.credential.TokenCredential tokenCredential, @Nonnull String[] allowedHosts, @Nullable ObservabilityOptions observabilityOptions, boolean isCaeEnabled, @Nonnull String... scopes) Creates a new instance of AzureIdentityAccessTokenProvider.- Parameters:
tokenCredential- The Azure.Identity.TokenCredential implementation to use.allowedHosts- The list of allowed hosts for which to request access tokens.observabilityOptions- The observability options to use.isCaeEnabled- A flag to enable or disable the Continuous Access Evaluation.scopes- The scopes to request access tokens for.
-
-
Method Details
-
getAuthorizationToken
@Nonnull public String getAuthorizationToken(@Nonnull URI uri, @Nullable Map<String, Object> additionalAuthenticationContext) - Specified by:
getAuthorizationTokenin interfacecom.microsoft.kiota.authentication.AccessTokenProvider
-
getAllowedHostsValidator
@Nonnull public com.microsoft.kiota.authentication.AllowedHostsValidator getAllowedHostsValidator()- Specified by:
getAllowedHostsValidatorin interfacecom.microsoft.kiota.authentication.AccessTokenProvider
-