add support for managed identity

This commit is contained in:
Mingliang Wang 2022-06-24 11:53:25 +08:00
Родитель eb650fb865
Коммит 6c5a02e286
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -137,7 +137,7 @@ public class GradleAuthHelper {
}
if (auth.getType() == null || auth.getType() == AuthType.AUTO) {
if (StringUtils.isAllBlank(auth.getCertificate(), auth.getCertificatePassword(), auth.getKey())) {
final Account account = findFirstAvailableAccount().block();
final Account account = findFirstAvailableAccount(auth).block();
if (account == null) {
throw new AzureToolkitAuthenticationException("There are no accounts available.");
}
@ -173,8 +173,8 @@ public class GradleAuthHelper {
}
}
private static Mono<Account> findFirstAvailableAccount() {
final List<Account> accounts = Azure.az(AzureAccount.class).accounts();
private static Mono<Account> findFirstAvailableAccount(AuthConfiguration auth) {
final List<Account> accounts = Azure.az(AzureAccount.class).initAccounts(auth);
if (accounts.isEmpty()) {
return Mono.error(new AzureToolkitAuthenticationException("There are no accounts available."));
}

Просмотреть файл

@ -33,7 +33,7 @@ subprojects {
targetCompatibility = 1.8
ext {
azureToolkitVersion = "0.20.0"
azureToolkitVersion = "0.22.0"
}
checkstyle {