mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-13 07:02:34 +00:00
fix: azure credential condition (fixes #375)
This commit is contained in:
parent
ad55078107
commit
29c40a06aa
2 changed files with 6 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue