only set OAuth client secret or password if set

This commit is contained in:
2024-03-13 10:35:01 -04:00
parent 8d634670e1
commit 9b4287b811

View File

@@ -117,6 +117,7 @@ public abstract class ApsAddressibleGoal extends DisablableGoal {
this.getLog().debug("OAuth Client ID: " + clientCreds.getUsername());
config.setOAuthClientId(clientCreds.getUsername());
if (clientCreds.getPassword() != null && clientCreds.getPassword().length() > 0)
config.setOAuthClientSecret(clientCreds.getPassword());
}
@@ -126,6 +127,7 @@ public abstract class ApsAddressibleGoal extends DisablableGoal {
this.getLog().debug("OAuth Username: " + oauthCreds.getUsername());
config.setOAuthUsername(oauthCreds.getUsername());
if (oauthCreds.getPassword() != null && oauthCreds.getPassword().length() > 0)
config.setOAuthPassword(oauthCreds.getPassword());
}