From 8660139cddaec94be2778500522be5854e704085 Mon Sep 17 00:00:00 2001 From: PASS Technologie <64657537+passtech@users.noreply.github.com> Date: Thu, 1 Sep 2022 19:04:29 +0200 Subject: [PATCH] Change field username to user following documentation --- .../rocketchatrestclient/RocketChatClientCallBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/baloise/rocketchatrestclient/RocketChatClientCallBuilder.java b/src/main/java/com/github/baloise/rocketchatrestclient/RocketChatClientCallBuilder.java index 3df5c02..516ae28 100644 --- a/src/main/java/com/github/baloise/rocketchatrestclient/RocketChatClientCallBuilder.java +++ b/src/main/java/com/github/baloise/rocketchatrestclient/RocketChatClientCallBuilder.java @@ -119,13 +119,13 @@ private void login() throws IOException { HttpResponse 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)