Class KeycloakUserMapper

java.lang.Object
org.nuxeo.ecm.platform.ui.web.keycloak.KeycloakUserMapper
All Implemented Interfaces:
UserMapper

public class KeycloakUserMapper extends Object implements UserMapper
Plugin for the UserMapper to manage mapping between Ketcloack user and Nuxeo counterpart
Since:
7.4
  • Field Details

    • userSchemaName

      protected static String userSchemaName
    • groupSchemaName

      protected static String groupSchemaName
    • userManager

      protected UserManager userManager
  • Constructor Details

    • KeycloakUserMapper

      public KeycloakUserMapper()
  • Method Details

    • getOrCreateAndUpdateNuxeoPrincipal

      public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(Object userObject)
      Description copied from interface: UserMapper
      Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject
      Specified by:
      getOrCreateAndUpdateNuxeoPrincipal in interface UserMapper
      Parameters:
      userObject - the object representing the user in the external system
    • getOrCreateAndUpdateNuxeoPrincipal

      public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params)
      Description copied from interface: UserMapper
      Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject
      Specified by:
      getOrCreateAndUpdateNuxeoPrincipal in interface UserMapper
      Parameters:
      userObject - the object representing the user in the external system
      createIfNeeded - flag to allow creation (default is true)
      update - flag to run update (default is true)
    • init

      public void init(Map<String,String> params) throws Exception
      Description copied from interface: UserMapper
      Init callback to receive the parameters set inside the descriptor
      Specified by:
      init in interface UserMapper
      Throws:
      Exception
    • wrapNuxeoPrincipal

      public Object wrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params)
      Description copied from interface: UserMapper
      Wrap the NuxeoPrincipal as the userObject used in the external authentication system
      Specified by:
      wrapNuxeoPrincipal in interface UserMapper
      Parameters:
      principal - the NuxeoPrincipal
      nativePrincipal - the native object to represent the principal in the target system
    • release

      public void release()
      Description copied from interface: UserMapper
      Release callback : called when the plugin is about to be unloaded
      Specified by:
      release in interface UserMapper