Skip to content

Commit 676e245

Browse files
committed
skip the validation when key/secret passed are null
1 parent 0b271ba commit 676e245

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • conductor-client/src/main/java/io/orkes/conductor/client

conductor-client/src/main/java/io/orkes/conductor/client/ApiClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import io.orkes.conductor.client.http.OrkesAuthentication;
3232
import io.orkes.conductor.client.http.Pair;
3333

34+
import lombok.extern.slf4j.Slf4j;
3435
import okhttp3.Call;
3536
import okhttp3.Callback;
3637
import okhttp3.Request;
@@ -41,6 +42,7 @@
4142
* migration for
4243
* users of orkes-conductor-client v2.
4344
*/
45+
@Slf4j
4446
public final class ApiClient extends ConductorClient {
4547

4648
private final OrkesAuthentication authentication;
@@ -185,7 +187,8 @@ public static class ApiClientBuilder extends Builder<ApiClientBuilder> {
185187

186188
public ApiClientBuilder credentials(String key, String secret) {
187189
if (StringUtils.isBlank(key) || StringUtils.isBlank(secret)) {
188-
throw new IllegalArgumentException("Key and secret must not be blank (null or empty)");
190+
log.warn("key or secret supplied is blank - ignoring. Client will not use authentication");
191+
return this;
189192
}
190193

191194
this.authentication = new OrkesAuthentication(key, secret);

0 commit comments

Comments
 (0)