Class IdentityProvidersResource
java.lang.Object
org.keycloak.services.resources.admin.IdentityProvidersResource
- Author:
- Pedro Igor
-
Constructor Summary
ConstructorDescriptionIdentityProvidersResource
(RealmModel realm, KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
create
(IdentityProviderRepresentation representation) Create a new identity providergetIdentityProvider
(String alias) getIdentityProviderFactory
(String providerId) Get the identity provider factory for a provider id.getIdentityProviders
(String search, Boolean briefRepresentation, Integer firstResult, Integer maxResults) List identity providers.Import identity provider from uploaded JSON fileimportFrom
(Map<String, Object> data) Import identity provider from JSON body
-
Constructor Details
-
IdentityProvidersResource
public IdentityProvidersResource(RealmModel realm, KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
-
Method Details
-
getIdentityProviderFactory
@Path("/providers/{provider_id}") @GET @Produces("application/json") public IdentityProviderFactory getIdentityProviderFactory(@PathParam("provider_id") String providerId) Get the identity provider factory for a provider id.- Parameters:
providerId
- Provider id- Returns:
-
importFrom
@POST @Path("import-config") @Consumes("multipart/form-data") @Produces("application/json") public Map<String,String> importFrom() throws IOExceptionImport identity provider from uploaded JSON file- Throws:
IOException
-
importFrom
@POST @Path("import-config") @Consumes("application/json") @Produces("application/json") public Map<String,String> importFrom(Map<String, Object> data) throws IOExceptionImport identity provider from JSON body- Parameters:
data
- JSON body- Returns:
- Throws:
IOException
-
getIdentityProviders
@GET @Path("instances") @Produces("application/json") public Stream<IdentityProviderRepresentation> getIdentityProviders(@QueryParam("search") String search, @QueryParam("briefRepresentation") Boolean briefRepresentation, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) List identity providers.- Parameters:
search
- Filter to search specific providers by name. Search can be prefixed (name*), contains (*name*) or exact (\"name\"). Default prefixed.briefRepresentation
- Boolean which defines whether brief representations are returned (default: false)firstResult
- Pagination offsetmaxResults
- Maximum results size (defaults to 100)- Returns:
- The list of providers.
-
create
@POST @Path("instances") @Consumes("application/json") public jakarta.ws.rs.core.Response create(IdentityProviderRepresentation representation) Create a new identity provider- Parameters:
representation
- JSON body- Returns:
-
getIdentityProvider
@Path("instances/{alias}") public IdentityProviderResource getIdentityProvider(@PathParam("alias") String alias)
-