Skip to content

Commit 195d38d

Browse files
committed
restore anonymous login functionality
1 parent edc54e9 commit 195d38d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main/java/org/zendesk/client/v2/Zendesk.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,14 +1151,11 @@ public Builder setRetry(boolean retry) {
11511151

11521152
public Zendesk build() {
11531153
if (token != null) {
1154-
return new Zendesk(client, url, username + "/token", token);
1155-
} else if(password != null) {
1156-
return new Zendesk(client, url, username, password);
1157-
} else {
1158-
return new Zendesk(client, url, oauthToken);
1154+
return new Zendesk(client, url, username + "/token", token);
1155+
} else if (oauthToken != null) {
1156+
return new Zendesk(client, url, oauthToken);
11591157
}
1160-
1161-
1158+
return new Zendesk(client, url, username, password);
11621159
}
11631160
}
11641161
}

0 commit comments

Comments
 (0)