title: Keycloak admin client
body: <p>I trying to use the keycloak client admin to create a user in my keycloak</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.keycloak&lt;/groupId&gt;
    &lt;artifactId&gt;keycloak-admin-client&lt;/artifactId&gt;
    &lt;version&gt;6.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and with this code:</p>
  
  <pre><code>Keycloak keycloak = KeycloakBuilder.builder() //
                  .serverUrl(serverUrl) //
                  .realm(realm) //
                  .grantType(OAuth2Constants.PASSWORD) //
                  .clientId(clientId) //
                  .clientSecret(clientSecret) //
                  .username("idm-admin") //
                  .password("admin") //
                  .build();
  
          UserRepresentation user = new UserRepresentation();
          user.setEnabled(true);
          user.setUsername("tester1");
          user.setFirstName("First");
          user.setLastName("Last");
          user.setEmail("tom+tester1@tdlabs.local");
          user.setAttributes(Collections.singletonMap("origin", Arrays.asList("demo")));
  
          // Get realm
          RealmResource realmResource = keycloak.realm(realm);
          UsersResource userRessource = realmResource.users();
  
          // Create user (requires manage-users role)
          Response response = userRessource.create(user);
          System.out.println("Repsonse: " + response.getStatusInfo());
          System.out.println(response.getLocation());
          String userId = response.getLocation().getPath().replaceAll(".*/([^/]+)$", "$1");
  
          System.out.printf("User created with userId: %s%n", userId);
  
          // Get realm role "tester" (requires view-realm role)
          RoleRepresentation testerRealmRole = realmResource.roles()//
                  .get("tester").toRepresentation();
  
          // Assign realm role tester to user
          userRessource.get(userId).roles().realmLevel() //
                  .add(Arrays.asList(testerRealmRole));
  
          // Get client
          ClientRepresentation app1Client = realmResource.clients() //
                  .findByClientId("app-javaee-petclinic").get(0);
  
          // Get client level role (requires view-clients role)
          RoleRepresentation userClientRole = realmResource.clients().get(app1Client.getId()) //
                  .roles().get("user").toRepresentation();
  
          // Assign client level role to user
          userRessource.get(userId).roles() //
                  .clientLevel(app1Client.getId()).add(Arrays.asList(userClientRole));
  
          // Define password credential
          CredentialRepresentation passwordCred = new CredentialRepresentation();
          passwordCred.setTemporary(false);
          passwordCred.setType(CredentialRepresentation.PASSWORD);
          passwordCred.setValue("test");
  
          // Set password credential
          userRessource.get(userId).resetPassword(passwordCred);
  </code></pre>
  
  <p>But in my line  Response response = userRessource.create(user); the IDE show the error: Cannot access javax.ws.rs.core.Response;  I`m using spring-boot 2.0.5.RELEASE and java 1.8</p>