KEYCLOAK-1187

This commit is contained in:
Stian Thorgersen 2015-04-13 13:54:30 +02:00
parent 600353899a
commit 46e386cd43
6 changed files with 7 additions and 9 deletions

View file

@ -1,6 +1,5 @@
package org.keycloak.admin.client.resource;
import org.keycloak.representations.idm.ApplicationRepresentation;
import org.keycloak.representations.idm.ClientRepresentation;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.UserSessionRepresentation;

View file

@ -1,6 +1,5 @@
package org.keycloak.admin.client.resource;
import org.keycloak.representations.idm.ApplicationRepresentation;
import org.keycloak.representations.idm.ClientRepresentation;
import javax.ws.rs.Consumes;
@ -17,8 +16,8 @@ import java.util.List;
*/
public interface ClientsResource {
@Path("{appName}")
public ClientResource get(@PathParam("appName") String appName);
@Path("{clientId}")
public ClientResource get(@PathParam("clientId") String clientId);
@POST
@Consumes(MediaType.APPLICATION_JSON)
@ -26,7 +25,7 @@ public interface ClientsResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<ApplicationRepresentation> findAll();
public List<ClientRepresentation> findAll();

View file

@ -23,7 +23,7 @@ public interface RealmResource {
@Consumes(MediaType.APPLICATION_JSON)
public void update(RealmRepresentation realmRepresentation);
@Path("applications")
@Path("clients")
public ClientsResource clients();
@Path("users")

View file

@ -212,7 +212,7 @@ public class AdapterTestStrategy extends ExternalResource {
Client client = ClientBuilder.newClient();
UriBuilder authBase = UriBuilder.fromUri(AUTH_SERVER_URL);
WebTarget adminTarget = client.target(AdminRoot.realmsUrl(authBase)).path("demo");
Map<String, Integer> stats = adminTarget.path("application-session-stats").request()
Map<String, Integer> stats = adminTarget.path("client-session-stats").request()
.header(HttpHeaders.AUTHORIZATION, "Bearer " + adminToken)
.get(new GenericType<Map<String, Integer>>() {
});

View file

@ -135,7 +135,7 @@ public class RelativeUriAdapterTest {
Client client = ClientBuilder.newClient();
UriBuilder authBase = UriBuilder.fromUri("http://localhost:8081/auth");
WebTarget adminTarget = client.target(AdminRoot.realmsUrl(authBase)).path("demo");
Map<String, Integer> stats = adminTarget.path("application-session-stats").request()
Map<String, Integer> stats = adminTarget.path("client-session-stats").request()
.header(HttpHeaders.AUTHORIZATION, "Bearer " + adminToken)
.get(new GenericType<Map<String, Integer>>(){});

View file

@ -466,7 +466,7 @@ public class SamlBindingTest {
Assert.assertNotNull(is);
formData.addFormData("file", is, MediaType.APPLICATION_XML_TYPE);
WebTarget upload = adminRealms.path("demo/application-importers/saml2-entity-descriptor/upload");
WebTarget upload = adminRealms.path("demo/client-importers/saml2-entity-descriptor/upload");
System.out.println(upload.getUri());
Response response = upload.request().post(Entity.entity(formData, MediaType.MULTIPART_FORM_DATA));
Assert.assertEquals(204, response.getStatus());