org.keycloak.services.resources.admin

## Class UserStorageProviderResource

- java.lang.Object
- - org.keycloak.services.resources.admin.UserStorageProviderResource

-     public class UserStorageProviderResource
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AdminEventBuilder` | `adminEvent`
    `protected AdminPermissionEvaluator` | `auth`
    `protected ClientConnection` | `clientConnection`
    `protected javax.ws.rs.core.HttpHeaders` | `headers`
    `protected RealmModel` | `realm`
    `protected KeycloakSession` | `session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserStorageProviderResource(RealmModel realm, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `getSimpleName(String id)` Need this for admin console to display simple name of provider when displaying user detail KEYCLOAK-4328
    `void` | `removeImportedUsers(String id)` Remove imported users
    `SynchronizationResult` | `syncMapperData(String parentId, String mapperId, String direction)` Trigger sync of mapper data related to ldap mapper (roles, groups, ...) direction is "fedToKeycloak" or "keycloakToFed"
    `SynchronizationResult` | `syncUsers(String id, String action)` Trigger sync of users Action can be "triggerFullSync" or "triggerChangedUsersSync"
    `void` | `unlinkUsers(String id)` Unlink imported users from a storage provider

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### realm

          protected RealmModel realm

    - #### auth

          protected AdminPermissionEvaluator auth

    - #### adminEvent

          protected AdminEventBuilder adminEvent

    - #### clientConnection

          @Context
          protected ClientConnection clientConnection

    - #### session

          @Context
          protected KeycloakSession session

    - #### headers

          @Context
          protected javax.ws.rs.core.HttpHeaders headers

  - ### Constructor Detail

    - #### UserStorageProviderResource

          public UserStorageProviderResource(RealmModel realm,
                                             AdminPermissionEvaluator auth,
                                             AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### getSimpleName

          @GET
           @Path(value="{id}/name")
           @Produces(value="application/json")
          public Map<String,String> getSimpleName(@PathParam(value="id")
                                                                                                                      String id)

      Need this for admin console to display simple name of provider when displaying user detail KEYCLOAK-4328
      Parameters:
        `id` -
      Returns:

    - #### syncUsers

          @POST
           @Path(value="{id}/sync")
           @Produces(value="application/json")
          public SynchronizationResult syncUsers(@PathParam(value="id")
                                                                                                                      String id,
                                                                                                                      @QueryParam(value="action")
                                                                                                                      String action)

      Trigger sync of users Action can be "triggerFullSync" or "triggerChangedUsersSync"
      Parameters:
        `id` -
        `action` -
      Returns:

    - #### removeImportedUsers

          @POST
           @Path(value="{id}/remove-imported-users")
          public void removeImportedUsers(@PathParam(value="id")
                                                                                           String id)

      Remove imported users
      Parameters:
        `id` -

    - #### unlinkUsers

          @POST
           @Path(value="{id}/unlink-users")
          public void unlinkUsers(@PathParam(value="id")
                                                                          String id)

      Unlink imported users from a storage provider
      Parameters:
        `id` -

    - #### syncMapperData

          @POST
           @Path(value="{parentId}/mappers/{id}/sync")
           @Produces(value="application/json")
          public SynchronizationResult syncMapperData(@PathParam(value="parentId")
                                                                                                                                              String parentId,
                                                                                                                                              @PathParam(value="id")
                                                                                                                                              String mapperId,
                                                                                                                                              @QueryParam(value="direction")
                                                                                                                                              String direction)

      Trigger sync of mapper data related to ldap mapper (roles, groups, ...) direction is "fedToKeycloak" or "keycloakToFed"
      Returns:

Copyright © 2020 JBoss by Red Hat. All rights reserved.