KEYCLOAK-2869 IdentityProvidersResource/IdentityProviderResource
This commit is contained in:
1 parent
8b9abf551d
commit
31683ce776
4 files changed
+510
-20
No files matched your search
+35
-3
@@ -17,19 +17,23 @@
|
||||
|
||||
package org.keycloak.admin.client.resource;
|
||||
|
||||
import org.keycloak.representations.idm.IdentityProviderMapperRepresentation;
|
||||
import org.keycloak.representations.idm.IdentityProviderMapperTypeRepresentation;
|
||||
import org.keycloak.representations.idm.IdentityProviderRepresentation;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author pedroigor
|
||||
@@ -49,6 +53,34 @@ public interface IdentityProviderResource {
|
||||
|
||||
@GET
|
||||
@Path("export")
|
||||
public Response export(@QueryParam("format") String format);
|
||||
Response export(@QueryParam("format") String format);
|
||||
|
||||
@GET
|
||||
@Path("mapper-types")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
Map<String, IdentityProviderMapperTypeRepresentation> getMapperTypes();
|
||||
|
||||
@GET
|
||||
@Path("mappers")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
List<IdentityProviderMapperRepresentation> getMappers();
|
||||
|
||||
@POST
|
||||
@Path("mappers")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
Response addMapper(IdentityProviderMapperRepresentation mapper);
|
||||
|
||||
@GET
|
||||
@Path("mappers/{id}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
IdentityProviderMapperRepresentation getMapperById(@PathParam("id") String id);
|
||||
|
||||
@PUT
|
||||
@Path("mappers/{id}")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
void update(@PathParam("id") String id, IdentityProviderMapperRepresentation rep);
|
||||
|
||||
@DELETE
|
||||
@Path("mappers/{id}")
|
||||
void delete(@PathParam("id") String id);
|
||||
}
|
||||
+21
-2
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.keycloak.admin.client.resource;
|
||||
|
||||
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput;
|
||||
import org.keycloak.representations.idm.IdentityProviderRepresentation;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
@@ -28,14 +29,15 @@ import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author pedroigor
|
||||
*/
|
||||
public interface IdentityProvidersResource {
|
||||
|
||||
@Path("instances/{id}")
|
||||
IdentityProviderResource get(@PathParam("id") String id);
|
||||
@Path("instances/{alias}")
|
||||
IdentityProviderResource get(@PathParam("alias") String alias);
|
||||
|
||||
@GET
|
||||
@Path("instances")
|
||||
@@ -46,4 +48,21 @@ public interface IdentityProvidersResource {
|
||||
@Path("instances")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
Response create(IdentityProviderRepresentation identityProvider);
|
||||
|
||||
@GET
|
||||
@Path("/providers/{provider_id}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
Response getIdentityProviders(@PathParam("provider_id") String providerId);
|
||||
|
||||
@POST
|
||||
@Path("import-config")
|
||||
@Consumes(MediaType.MULTIPART_FORM_DATA)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
Map<String, String> importFrom(MultipartFormDataOutput data);
|
||||
|
||||
@POST
|
||||
@Path("import-config")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
Map<String, String> importFrom(Map<String, Object> data);
|
||||
}
|
||||
Reference in new issue
Block a user