Class CmsJlanUsers

java.lang.Object
org.opencms.jlan.CmsJlanUsers
All Implemented Interfaces:
org.alfresco.jlan.server.auth.UsersInterface

public class CmsJlanUsers extends Object implements org.alfresco.jlan.server.auth.UsersInterface
This class is used for authenticating OpenCms users to JLAN.

Since JLAN requires MD4 password hashes for authentication, which are not by default stored in the database, users who want to use the JLAN functionality should log in at least once into OpenCms normally so that the MD4 hash of their password can be computed and stored.

  • Field Details

  • Constructor Details

  • Method Details

    • hashPassword

      public static byte[] hashPassword(String password) throws InvalidKeyException, NoSuchAlgorithmException
      Computes an MD4 hash for the password.
      Parameters:
      password - the password for which to compute the hash
      Returns:
      the password hash
      Throws:
      NoSuchAlgorithmException
      InvalidKeyException
    • setAdminCms

      public static void setAdminCms(CmsObject cms)
      Sets the CMS context.

      Parameters:
      cms - the context to set
    • translateUser

      public static final String translateUser(String name)
      Translates user names by replacing a custom OU separator with the standard OU separator '/'. This is needed because either JLAN or the client cuts off the part before the slash during authentication, so OpenCms never gets to see it. So if we want CIFS authentication for users from non-root OUs, we need to use a different separator.

      Parameters:
      name - the user name to translate
      Returns:
      the translated user name
    • getUserAccount

      public org.alfresco.jlan.server.auth.UserAccount getUserAccount(String userName)
      Specified by:
      getUserAccount in interface org.alfresco.jlan.server.auth.UsersInterface
      See Also:
      • UsersInterface.getUserAccount(java.lang.String)
    • initializeUsers

      public void initializeUsers(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)
      Specified by:
      initializeUsers in interface org.alfresco.jlan.server.auth.UsersInterface
      See Also:
      • UsersInterface.initializeUsers(org.alfresco.jlan.server.config.ServerConfiguration, org.springframework.extensions.config.ConfigElement)