only set OAuth client secret or password if set
This commit is contained in:
@@ -117,6 +117,7 @@ public abstract class ApsAddressibleGoal extends DisablableGoal {
|
|||||||
|
|
||||||
this.getLog().debug("OAuth Client ID: " + clientCreds.getUsername());
|
this.getLog().debug("OAuth Client ID: " + clientCreds.getUsername());
|
||||||
config.setOAuthClientId(clientCreds.getUsername());
|
config.setOAuthClientId(clientCreds.getUsername());
|
||||||
|
if (clientCreds.getPassword() != null && clientCreds.getPassword().length() > 0)
|
||||||
config.setOAuthClientSecret(clientCreds.getPassword());
|
config.setOAuthClientSecret(clientCreds.getPassword());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,6 +127,7 @@ public abstract class ApsAddressibleGoal extends DisablableGoal {
|
|||||||
|
|
||||||
this.getLog().debug("OAuth Username: " + oauthCreds.getUsername());
|
this.getLog().debug("OAuth Username: " + oauthCreds.getUsername());
|
||||||
config.setOAuthUsername(oauthCreds.getUsername());
|
config.setOAuthUsername(oauthCreds.getUsername());
|
||||||
|
if (oauthCreds.getPassword() != null && oauthCreds.getPassword().length() > 0)
|
||||||
config.setOAuthPassword(oauthCreds.getPassword());
|
config.setOAuthPassword(oauthCreds.getPassword());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user