Skip to content

Commit

Permalink
Merge pull request #75 from passtech/passtech-patch-1
Browse files Browse the repository at this point in the history
Change field username to user following documentation
  • Loading branch information
culmat committed Jul 9, 2024
2 parents 0906b8a + 8660139 commit c5bf7bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ private void login() throws IOException {
HttpResponse<JsonNode> loginResult;

try {
loginResult = Unirest.post(serverUrl + "v1/login").field("username", user).field("password", password).asJson();
loginResult = Unirest.post(serverUrl + "v1/login").field("user", user).field("password", password).asJson();
} catch (UnirestException e) {
throw new IOException(e);
}

if (loginResult.getStatus() == 401)
throw new IOException("The username and password provided are incorrect.");
throw new IOException("The user and password provided are incorrect.");


if (loginResult.getStatus() != 200)
Expand Down

0 comments on commit c5bf7bb

Please sign in to comment.