public class CmsJlanUsers extends java.lang.Object implements org.alfresco.jlan.server.auth.UsersInterface
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_OU_SEPARATOR
The default OU separator to use if none is configured.
|
static java.lang.String |
JLAN_HASH
The additional info key for the MD4 password hash.
|
static java.lang.String |
PARAM_JLAN_OU_SEPARATOR
Name of the runtime property used to configure the OU separator for CIFS login.
|
Constructor and Description |
---|
CmsJlanUsers() |
Modifier and Type | Method and Description |
---|---|
org.alfresco.jlan.server.auth.UserAccount |
getUserAccount(java.lang.String userName) |
static byte[] |
hashPassword(java.lang.String password)
Computes an MD4 hash for the password.
|
void |
initializeUsers(org.alfresco.jlan.server.config.ServerConfiguration config,
org.springframework.extensions.config.ConfigElement params) |
static void |
setAdminCms(CmsObject cms)
Sets the CMS context.
|
static java.lang.String |
translateUser(java.lang.String name)
Translates user names by replacing a custom OU separator with the standard OU separator '/'.
|
public static final java.lang.String DEFAULT_OU_SEPARATOR
public static final java.lang.String JLAN_HASH
public static final java.lang.String PARAM_JLAN_OU_SEPARATOR
public CmsJlanUsers()
public org.alfresco.jlan.server.auth.UserAccount getUserAccount(java.lang.String userName)
getUserAccount
in interface org.alfresco.jlan.server.auth.UsersInterface
UsersInterface.getUserAccount(java.lang.String)
public static byte[] hashPassword(java.lang.String password) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException
password
- the password for which to compute the hashjava.security.NoSuchAlgorithmException
java.security.InvalidKeyException
public void initializeUsers(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)
initializeUsers
in interface org.alfresco.jlan.server.auth.UsersInterface
UsersInterface.initializeUsers(org.alfresco.jlan.server.config.ServerConfiguration, org.springframework.extensions.config.ConfigElement)
public static void setAdminCms(CmsObject cms)
cms
- the context to setpublic static final java.lang.String translateUser(java.lang.String name)
name
- the user name to translate