code: public CompletionStage<Token> login(final String username,
              final String password, final AuthModule eauth) {
          Map<String, String> props = new LinkedHashMap<>();
          props.put("username", username);
          props.put("password", password);
          props.put("eauth", eauth.getValue());
  
          String payload = gson.toJson(props);
  
          CompletionStage<Token> result = asyncHttpClient
                  .post(uri.resolve("login"), payload, JsonParser.TOKEN)
                  .thenApply(r -> {
                      // They return a list of tokens here, take the first one
                      Token token = r.getResult().get(0);
                      return token;
                  });
  
          return result;
      }
docs: Non-blocking version of login() returning a CompletionStage with the token.
  <p>
  {@code POST /login}
  
  @param username the username
  @param password the password
  @param eauth the eauth type
  @return CompletionStage holding the authentication token