fix: azure credential condition (fixes #375)

This commit is contained in:
Carl-Robert Linnupuu 2024-02-19 18:17:06 +02:00
parent ad55078107
commit 29c40a06aa
2 changed files with 6 additions and 4 deletions

View file

@ -47,9 +47,11 @@ abstract class AbstractCredentialsManager {
protected void setCredential(String key, String credential) {
if (credential == null) {
return;
credentialCache.remove(key);
} else {
credentialCache.put(key, credential);
}
passwordSafe.setPassword(credentialMapping.get(key), credential);
credentialCache.put(key, credential);
}
}

View file

@ -21,9 +21,9 @@ public final class AzureCredentialsManager extends AbstractCredentialsManager {
@Override
public boolean isCredentialSet() {
if (AzureSettings.getCurrentState().isUseAzureApiKeyAuthentication()) {
return isCredentialSet(ACTIVE_DIRECTORY_TOKEN);
return isCredentialSet(API_KEY);
}
return isCredentialSet(API_KEY);
return isCredentialSet(ACTIVE_DIRECTORY_TOKEN);
}
@Override