Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jacocoTestReport {
}

jacoco {
toolVersion = "0.8.10"
toolVersion = "0.8.12"
}

spotbugsMain {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,31 @@ public class AzureIdentityAccessTokenProvider extends com.microsoft.kiota.authen
public AzureIdentityAccessTokenProvider(@Nonnull TokenCredential tokenCredential) {
this(tokenCredential, new String[] {}, null);
}
/** {@inheritDoc} */
/**
* Creates a new instance of AzureIdentityAccessTokenProvider.
* @param tokenCredential The Azure.Identity.TokenCredential implementation to use.
* @param allowedHosts The list of allowed hosts for which to request access tokens.
* @param scopes The scopes to request access tokens for.
* @param observabilityOptions The observability options to use.
*/
@SuppressWarnings("LambdaLast")
public AzureIdentityAccessTokenProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts,
@Nullable final ObservabilityOptions observabilityOptions, @Nonnull final String... scopes) {
super(tokenCredential, allowedHosts, observabilityOptions, scopes);
this(tokenCredential, allowedHosts, observabilityOptions, true, scopes);
}

/**
* Creates a new instance of AzureIdentityAccessTokenProvider.
* @param tokenCredential The Azure.Identity.TokenCredential implementation to use.
* @param allowedHosts The list of allowed hosts for which to request access tokens.
* @param scopes The scopes to request access tokens for.
* @param observabilityOptions The observability options to use.
* @param isCaeEnabled Whether to enable Continuous Access Evaluation, defaults to true.
*/
@SuppressWarnings("LambdaLast")
public AzureIdentityAccessTokenProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts,
@Nullable final ObservabilityOptions observabilityOptions, final boolean isCaeEnabled, @Nonnull final String... scopes) {
super(tokenCredential, allowedHosts, observabilityOptions, isCaeEnabled, scopes);
if (allowedHosts == null || allowedHosts.length == 0) {
final HashSet<String> allowedHostsSet = new HashSet<String>();
allowedHostsSet.add("graph.microsoft.com");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ public AzureIdentityAuthenticationProvider(@Nonnull final TokenCredential tokenC
*/
@SuppressWarnings("LambdaLast")
public AzureIdentityAuthenticationProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts, @Nullable final ObservabilityOptions observabilityOptions, @Nonnull final String... scopes) {
super(new AzureIdentityAccessTokenProvider(tokenCredential, allowedHosts, observabilityOptions, scopes));
this(tokenCredential, allowedHosts, observabilityOptions, true, scopes);
}

/**
* Creates a new instance of AzureIdentityAuthenticationProvider.
* @param tokenCredential The Azure.Identity.TokenCredential implementation to use.
* @param allowedHosts The list of allowed hosts for which to request access tokens.
* @param observabilityOptions The observability options to use.
* @param isCaeEnabled Whether to enable Continuous Access Evaluation, defaults to true.
* @param scopes The scopes to request access tokens for.
*/
@SuppressWarnings("LambdaLast")
public AzureIdentityAuthenticationProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts, @Nullable final ObservabilityOptions observabilityOptions, final boolean isCaeEnabled, @Nonnull final String... scopes) {
super(new AzureIdentityAccessTokenProvider(tokenCredential, allowedHosts, observabilityOptions, isCaeEnabled, scopes));
}
}
Loading