Class NullMutableAuthenticationDao
- java.lang.Object
-
- org.alfresco.repo.security.authentication.ntlm.NullMutableAuthenticationDao
-
- All Implemented Interfaces:
net.sf.acegisecurity.providers.dao.AuthenticationDao,net.sf.acegisecurity.providers.dao.SaltSource,MutableAuthenticationDao
public class NullMutableAuthenticationDao extends Object implements MutableAuthenticationDao
Null Mutable Authentication Dao ClassMutable authentication implementation that does nothing.
- Author:
- GKSpencer
-
-
Constructor Summary
Constructors Constructor Description NullMutableAuthenticationDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateUser(String userName, char[] rawPassword)Create a user with the given userName and passwordvoidcreateUser(String caseSensitiveUserName, String hashedpassword, char[] rawPassword)Create a user with the given userName and password hash If hashedPassword is passed in then this is used, otherwise it falls back to using the rawPassword.voiddeleteUser(String userName)Delete a user.booleangetAccountExpires(String userName)Does the account expire?DategetAccountExpiryDate(String userName)Get the date when this account expires.booleangetAccountHasExpired(String userName)Has the account expired?booleangetAccountlocked(String userName)Is the account locked?booleangetCredentialsExpire(String userName)Do the credentials for the user expire?DategetCredentialsExpiryDate(String userName)Get the date when the credentials/password expire.booleangetCredentialsHaveExpired(String userName)Have the credentials for the user expired?booleangetEnabled(String userName)Getter for user enabledbooleangetLocked(String userName)Check if the account is lockedStringgetMD4HashedPassword(String userName)Get the MD4 password hashObjectgetSalt(net.sf.acegisecurity.UserDetails user)net.sf.acegisecurity.UserDetailsloadUserByUsername(String arg0)voidsetAccountExpires(String userName, boolean expires)Set if the account should expirevoidsetAccountExpiryDate(String userName, Date exipryDate)Set the date on which the account expiresvoidsetCredentialsExpire(String userName, boolean expires)Set if the password expires.voidsetCredentialsExpiryDate(String userName, Date exipryDate)Set the date when credentials expire.voidsetEnabled(String userName, boolean enabled)Enable/disable a user.voidsetLocked(String userName, boolean locked)Set if the account is locked.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidupdateUser(String userName, char[] rawPassword)Update a user's password.booleanuserExists(String userName)Check is a user exists.
-
-
-
Method Detail
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService- ignored
-
createUser
public void createUser(String userName, char[] rawPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
Description copied from interface:MutableAuthenticationDaoCreate a user with the given userName and password- Specified by:
createUserin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implementedorg.alfresco.repo.security.authentication.AuthenticationException
-
createUser
public void createUser(String caseSensitiveUserName, String hashedpassword, char[] rawPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
Description copied from interface:MutableAuthenticationDaoCreate a user with the given userName and password hash If hashedPassword is passed in then this is used, otherwise it falls back to using the rawPassword. It is assumed the hashed password has been encoded using system.preferred.password.encoding and doesn't use its own salt.- Specified by:
createUserin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implementedorg.alfresco.repo.security.authentication.AuthenticationException
-
updateUser
public void updateUser(String userName, char[] rawPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
Description copied from interface:MutableAuthenticationDaoUpdate a user's password.- Specified by:
updateUserin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implementedorg.alfresco.repo.security.authentication.AuthenticationException
-
deleteUser
public void deleteUser(String userName) throws org.alfresco.repo.security.authentication.AuthenticationException
Description copied from interface:MutableAuthenticationDaoDelete a user.- Specified by:
deleteUserin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implementedorg.alfresco.repo.security.authentication.AuthenticationException
-
userExists
public boolean userExists(String userName)
Check is a user exists.- Specified by:
userExistsin interfaceMutableAuthenticationDao- Returns:
- true always
-
setEnabled
public void setEnabled(String userName, boolean enabled)
Description copied from interface:MutableAuthenticationDaoEnable/disable a user.- Specified by:
setEnabledin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getEnabled
public boolean getEnabled(String userName)
Description copied from interface:MutableAuthenticationDaoGetter for user enabled- Specified by:
getEnabledin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
setAccountExpires
public void setAccountExpires(String userName, boolean expires)
Description copied from interface:MutableAuthenticationDaoSet if the account should expire- Specified by:
setAccountExpiresin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getAccountExpires
public boolean getAccountExpires(String userName)
Description copied from interface:MutableAuthenticationDaoDoes the account expire?- Specified by:
getAccountExpiresin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getAccountHasExpired
public boolean getAccountHasExpired(String userName)
Description copied from interface:MutableAuthenticationDaoHas the account expired?- Specified by:
getAccountHasExpiredin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
setCredentialsExpire
public void setCredentialsExpire(String userName, boolean expires)
Description copied from interface:MutableAuthenticationDaoSet if the password expires.- Specified by:
setCredentialsExpirein interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getCredentialsExpire
public boolean getCredentialsExpire(String userName)
Description copied from interface:MutableAuthenticationDaoDo the credentials for the user expire?- Specified by:
getCredentialsExpirein interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getCredentialsHaveExpired
public boolean getCredentialsHaveExpired(String userName)
Description copied from interface:MutableAuthenticationDaoHave the credentials for the user expired?- Specified by:
getCredentialsHaveExpiredin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
setLocked
public void setLocked(String userName, boolean locked)
Description copied from interface:MutableAuthenticationDaoSet if the account is locked.- Specified by:
setLockedin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getLocked
public boolean getLocked(String userName)
Description copied from interface:MutableAuthenticationDaoCheck if the account is locked- Specified by:
getLockedin interfaceMutableAuthenticationDao- Parameters:
userName- the username- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getAccountlocked
public boolean getAccountlocked(String userName)
Description copied from interface:MutableAuthenticationDaoIs the account locked?- Specified by:
getAccountlockedin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
setAccountExpiryDate
public void setAccountExpiryDate(String userName, Date exipryDate)
Description copied from interface:MutableAuthenticationDaoSet the date on which the account expires- Specified by:
setAccountExpiryDatein interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getAccountExpiryDate
public Date getAccountExpiryDate(String userName)
Description copied from interface:MutableAuthenticationDaoGet the date when this account expires.- Specified by:
getAccountExpiryDatein interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
setCredentialsExpiryDate
public void setCredentialsExpiryDate(String userName, Date exipryDate)
Description copied from interface:MutableAuthenticationDaoSet the date when credentials expire.- Specified by:
setCredentialsExpiryDatein interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getCredentialsExpiryDate
public Date getCredentialsExpiryDate(String userName)
Description copied from interface:MutableAuthenticationDaoGet the date when the credentials/password expire.- Specified by:
getCredentialsExpiryDatein interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
getMD4HashedPassword
public String getMD4HashedPassword(String userName)
Description copied from interface:MutableAuthenticationDaoGet the MD4 password hash- Specified by:
getMD4HashedPasswordin interfaceMutableAuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
loadUserByUsername
public net.sf.acegisecurity.UserDetails loadUserByUsername(String arg0) throws net.sf.acegisecurity.providers.dao.UsernameNotFoundException, org.springframework.dao.DataAccessException
- Specified by:
loadUserByUsernamein interfacenet.sf.acegisecurity.providers.dao.AuthenticationDao- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implementednet.sf.acegisecurity.providers.dao.UsernameNotFoundExceptionorg.springframework.dao.DataAccessException
-
getSalt
public Object getSalt(net.sf.acegisecurity.UserDetails user)
- Specified by:
getSaltin interfacenet.sf.acegisecurity.providers.dao.SaltSource- Throws:
org.alfresco.error.AlfrescoRuntimeException- Not implemented
-
-