KEYCLOAK-1187
This commit is contained in:
parent
600353899a
commit
46e386cd43
6 changed files with 7 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
||||||
package org.keycloak.admin.client.resource;
|
package org.keycloak.admin.client.resource;
|
||||||
|
|
||||||
import org.keycloak.representations.idm.ApplicationRepresentation;
|
|
||||||
import org.keycloak.representations.idm.ClientRepresentation;
|
import org.keycloak.representations.idm.ClientRepresentation;
|
||||||
import org.keycloak.representations.idm.CredentialRepresentation;
|
import org.keycloak.representations.idm.CredentialRepresentation;
|
||||||
import org.keycloak.representations.idm.UserSessionRepresentation;
|
import org.keycloak.representations.idm.UserSessionRepresentation;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.keycloak.admin.client.resource;
|
package org.keycloak.admin.client.resource;
|
||||||
|
|
||||||
import org.keycloak.representations.idm.ApplicationRepresentation;
|
|
||||||
import org.keycloak.representations.idm.ClientRepresentation;
|
import org.keycloak.representations.idm.ClientRepresentation;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
|
@ -17,8 +16,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface ClientsResource {
|
public interface ClientsResource {
|
||||||
|
|
||||||
@Path("{appName}")
|
@Path("{clientId}")
|
||||||
public ClientResource get(@PathParam("appName") String appName);
|
public ClientResource get(@PathParam("clientId") String clientId);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@ -26,7 +25,7 @@ public interface ClientsResource {
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public List<ApplicationRepresentation> findAll();
|
public List<ClientRepresentation> findAll();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public interface RealmResource {
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
public void update(RealmRepresentation realmRepresentation);
|
public void update(RealmRepresentation realmRepresentation);
|
||||||
|
|
||||||
@Path("applications")
|
@Path("clients")
|
||||||
public ClientsResource clients();
|
public ClientsResource clients();
|
||||||
|
|
||||||
@Path("users")
|
@Path("users")
|
||||||
|
|
|
@ -212,7 +212,7 @@ public class AdapterTestStrategy extends ExternalResource {
|
||||||
Client client = ClientBuilder.newClient();
|
Client client = ClientBuilder.newClient();
|
||||||
UriBuilder authBase = UriBuilder.fromUri(AUTH_SERVER_URL);
|
UriBuilder authBase = UriBuilder.fromUri(AUTH_SERVER_URL);
|
||||||
WebTarget adminTarget = client.target(AdminRoot.realmsUrl(authBase)).path("demo");
|
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)
|
.header(HttpHeaders.AUTHORIZATION, "Bearer " + adminToken)
|
||||||
.get(new GenericType<Map<String, Integer>>() {
|
.get(new GenericType<Map<String, Integer>>() {
|
||||||
});
|
});
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class RelativeUriAdapterTest {
|
||||||
Client client = ClientBuilder.newClient();
|
Client client = ClientBuilder.newClient();
|
||||||
UriBuilder authBase = UriBuilder.fromUri("http://localhost:8081/auth");
|
UriBuilder authBase = UriBuilder.fromUri("http://localhost:8081/auth");
|
||||||
WebTarget adminTarget = client.target(AdminRoot.realmsUrl(authBase)).path("demo");
|
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)
|
.header(HttpHeaders.AUTHORIZATION, "Bearer " + adminToken)
|
||||||
.get(new GenericType<Map<String, Integer>>(){});
|
.get(new GenericType<Map<String, Integer>>(){});
|
||||||
|
|
||||||
|
|
|
@ -466,7 +466,7 @@ public class SamlBindingTest {
|
||||||
Assert.assertNotNull(is);
|
Assert.assertNotNull(is);
|
||||||
formData.addFormData("file", is, MediaType.APPLICATION_XML_TYPE);
|
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());
|
System.out.println(upload.getUri());
|
||||||
Response response = upload.request().post(Entity.entity(formData, MediaType.MULTIPART_FORM_DATA));
|
Response response = upload.request().post(Entity.entity(formData, MediaType.MULTIPART_FORM_DATA));
|
||||||
Assert.assertEquals(204, response.getStatus());
|
Assert.assertEquals(204, response.getStatus());
|
||||||
|
|
Loading…
Reference in a new issue