public void retrieveSessionToken() {
//TODO: support authentication with JAX-RS 2.0
//authenticator.get().addAuthenticator(client, username.get(), password.get());
WebTarget managementResource = this.client.target(getSessionsUri());
JsonObject result = managementResource
.path("sessions")
.request(MediaType.APPLICATION_JSON)
.header("X-Requested-By", "")
.post(Entity.entity(Json.createObjectBuilder().build(), MediaType.APPLICATION_JSON), JsonObject.class);
JsonObject extraProps = result.getJsonObject("extraProperties");