public class DefaultMutableAuthenticationDao extends Object implements MutableAuthenticationDao
Constructor and Description |
---|
DefaultMutableAuthenticationDao() |
Modifier and Type | Method and Description |
---|---|
void |
createUser(String userName,
char[] rawPassword)
Create a user with the given userName and password
|
void |
createUser(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.
|
void |
deleteUser(String userName)
Delete a user.
|
boolean |
getAccountExpires(String userName)
Does the account expire?
|
Date |
getAccountExpiryDate(String userName)
Get the date when this account expires.
|
boolean |
getAccountHasExpired(String userName)
Has the account expired?
|
boolean |
getAccountlocked(String userName)
Is the account locked?
|
boolean |
getCredentialsExpire(String userName)
Do the credentials for the user expire?
|
Date |
getCredentialsExpiryDate(String userName)
Get the date when the credentials/password expire.
|
boolean |
getCredentialsHaveExpired(String userName)
Have the credentials for the user expired?
|
boolean |
getEnabled(String userName)
Getter for user enabled
|
boolean |
getLocked(String userName)
Check if the account is locked
|
String |
getMD4HashedPassword(String userName)
Get the MD4 password hash
|
Object |
getSalt(net.sf.acegisecurity.UserDetails user) |
net.sf.acegisecurity.UserDetails |
loadUserByUsername(String arg0) |
void |
setAccountExpires(String userName,
boolean expires)
Set if the account should expire
|
void |
setAccountExpiryDate(String userName,
Date exipryDate)
Set the date on which the account expires
|
void |
setAllowCreateUser(boolean allowCreateUser) |
void |
setAllowDeleteUser(boolean allowDeleteUser) |
void |
setAllowGetAccountExpiryDate(boolean allowGetAccountExpiryDate) |
void |
setAllowGetAccountHasExpired(boolean allowGetAccountHasExpired) |
void |
setAllowGetAccountLocked(boolean allowGetAccountLocked) |
void |
setAllowGetCredentialsExpire(boolean allowGetCredentialsExpire) |
void |
setAllowGetCredentialsExpiryDate(boolean allowGetCredentialsExpiryDate) |
void |
setAllowGetCredentialsHaveExpired(boolean allowGetCredentialsHaveExpired) |
void |
setAllowGetEnabled(boolean allowGetEnabled) |
void |
setAllowSetAccountExpires(boolean allowSetAccountExpires) |
void |
setAllowSetAccountExpiryDate(boolean allowSetAccountExpiryDate) |
void |
setAllowSetAccountLocked(boolean allowSetAccountLocked) |
void |
setAllowSetCredentialsExpire(boolean allowSetCredentialsExpire) |
void |
setAllowSetCredentialsExpiryDate(boolean allowSetCredentialsExpiryDate) |
void |
setAllowSetEnabled(boolean allowSetEnabled) |
void |
setAllowUpdateUser(boolean allowUpdateUser) |
void |
setCredentialsExpire(String userName,
boolean expires)
Set if the password expires.
|
void |
setCredentialsExpiryDate(String userName,
Date exipryDate)
Set the date when credentials expire.
|
void |
setEnabled(String userName,
boolean enabled)
Enable/disable a user.
|
void |
setLocked(String userName,
boolean locked)
Set if the account is locked.
|
void |
updateUser(String userName,
char[] rawPassword)
Update a user's password.
|
boolean |
userExists(String userName)
Check is a user exists.
|
public void createUser(String userName, char[] rawPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
createUser
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedorg.alfresco.repo.security.authentication.AuthenticationException
public void createUser(String caseSensitiveUserName, String hashedpassword, char[] rawPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
createUser
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedorg.alfresco.repo.security.authentication.AuthenticationException
public void updateUser(String userName, char[] rawPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
updateUser
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedorg.alfresco.repo.security.authentication.AuthenticationException
public void deleteUser(String userName) throws org.alfresco.repo.security.authentication.AuthenticationException
deleteUser
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedorg.alfresco.repo.security.authentication.AuthenticationException
public boolean userExists(String userName)
userExists
in interface MutableAuthenticationDao
public void setEnabled(String userName, boolean enabled)
setEnabled
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getEnabled(String userName)
getEnabled
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic void setAccountExpires(String userName, boolean expires)
setAccountExpires
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getAccountExpires(String userName)
getAccountExpires
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getAccountHasExpired(String userName)
getAccountHasExpired
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic void setCredentialsExpire(String userName, boolean expires)
setCredentialsExpire
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getCredentialsExpire(String userName)
getCredentialsExpire
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getCredentialsHaveExpired(String userName)
getCredentialsHaveExpired
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic void setLocked(String userName, boolean locked)
setLocked
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getLocked(String userName)
getLocked
in interface MutableAuthenticationDao
userName
- the usernameorg.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic boolean getAccountlocked(String userName)
MutableAuthenticationDao
getAccountlocked
in interface MutableAuthenticationDao
getLocked(String)
public void setAccountExpiryDate(String userName, Date exipryDate)
setAccountExpiryDate
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic Date getAccountExpiryDate(String userName)
getAccountExpiryDate
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic void setCredentialsExpiryDate(String userName, Date exipryDate)
setCredentialsExpiryDate
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic Date getCredentialsExpiryDate(String userName)
getCredentialsExpiryDate
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- if the the operation is not allowedpublic String getMD4HashedPassword(String userName)
MutableAuthenticationDao
getMD4HashedPassword
in interface MutableAuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- alwayspublic net.sf.acegisecurity.UserDetails loadUserByUsername(String arg0) throws net.sf.acegisecurity.providers.dao.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadUserByUsername
in interface net.sf.acegisecurity.providers.dao.AuthenticationDao
org.alfresco.error.AlfrescoRuntimeException
- alwaysnet.sf.acegisecurity.providers.dao.UsernameNotFoundException
org.springframework.dao.DataAccessException
public Object getSalt(net.sf.acegisecurity.UserDetails user)
getSalt
in interface net.sf.acegisecurity.providers.dao.SaltSource
org.alfresco.error.AlfrescoRuntimeException
- alwayspublic void setAllowCreateUser(boolean allowCreateUser)
public void setAllowDeleteUser(boolean allowDeleteUser)
public void setAllowGetAccountExpiryDate(boolean allowGetAccountExpiryDate)
public void setAllowGetAccountHasExpired(boolean allowGetAccountHasExpired)
public void setAllowGetAccountLocked(boolean allowGetAccountLocked)
public void setAllowGetCredentialsExpire(boolean allowGetCredentialsExpire)
public void setAllowGetCredentialsExpiryDate(boolean allowGetCredentialsExpiryDate)
public void setAllowGetCredentialsHaveExpired(boolean allowGetCredentialsHaveExpired)
public void setAllowGetEnabled(boolean allowGetEnabled)
public void setAllowSetAccountExpires(boolean allowSetAccountExpires)
public void setAllowSetAccountExpiryDate(boolean allowSetAccountExpiryDate)
public void setAllowSetAccountLocked(boolean allowSetAccountLocked)
public void setAllowSetCredentialsExpire(boolean allowSetCredentialsExpire)
public void setAllowSetCredentialsExpiryDate(boolean allowSetCredentialsExpiryDate)
public void setAllowSetEnabled(boolean allowSetEnabled)
public void setAllowUpdateUser(boolean allowUpdateUser)
Copyright © 2005–2017 Alfresco Software. All rights reserved.