private final ResteasyWebTarget target;
private final ResteasyClient client;
private Keycloak(String serverUrl, String realm, String username, String password, String clientId, String clientSecret){
config = new Config(serverUrl, realm, username, password, clientId, clientSecret);
tokenManager = new TokenManager(config);
client = new ResteasyClientBuilder().build();
target = client.target(config.getServerUrl());
target.register(new BearerAuthFilter(tokenManager.getAccessTokenString()));