|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ftpserver.usermanager.AbstractUserManager
org.apache.ftpserver.usermanager.PropertiesUserManager
public class PropertiesUserManager
Properties file based UserManager
implementation.
We use user.properties
file to store user data.
Field Summary |
---|
Fields inherited from class org.apache.ftpserver.usermanager.AbstractUserManager |
---|
ATTR_ENABLE, ATTR_HOME, ATTR_LOGIN, ATTR_MAX_DOWNLOAD_RATE, ATTR_MAX_IDLE_TIME, ATTR_MAX_LOGIN_NUMBER, ATTR_MAX_LOGIN_PER_IP, ATTR_MAX_UPLOAD_RATE, ATTR_PASSWORD, ATTR_WRITE_PERM |
Constructor Summary | |
---|---|
PropertiesUserManager()
|
Method Summary | |
---|---|
User |
authenticate(Authentication authentication)
User authenticate method |
void |
configure()
Configure user manager. |
void |
delete(java.lang.String usrName)
Delete an user. |
void |
dispose()
Close the user manager - remove existing entries. |
boolean |
doesExist(java.lang.String name)
User existance check |
java.lang.String[] |
getAllUserNames()
Get all user names. |
User |
getUserByName(java.lang.String userName)
Load user data. |
boolean |
isEncryptPassword()
If true is returned, passwords will be stored as hashes rather than in clear text. |
void |
save(User usr)
Save user data. |
void |
setEncryptPasswords(boolean encryptPassword)
If set to true, passwords will be stored as a hash to ensure that it can not be retrived from the user file. |
void |
setPropFile(java.io.File propFile)
Set the file used to store and read users. |
void |
setPropPasswordEncrypt(boolean encryptPassword)
Deprecated. Use setEncryptPasswords(boolean) |
Methods inherited from class org.apache.ftpserver.usermanager.AbstractUserManager |
---|
getAdminName, isAdmin, setAdmin, setAdminName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesUserManager()
Method Detail |
---|
public void setPropFile(java.io.File propFile)
configure()
is called.
propFile
- A file containing userspublic boolean isEncryptPassword()
public void setEncryptPasswords(boolean encryptPassword)
configure()
is called.
encryptPassword
- True to store a hash of the passwords,
false to store the passwords in clear text.public void setPropPasswordEncrypt(boolean encryptPassword)
setEncryptPasswords(boolean)
public void configure()
public void save(User usr) throws FtpException
FtpException
public void delete(java.lang.String usrName) throws FtpException
FtpException
public java.lang.String[] getAllUserNames()
public User getUserByName(java.lang.String userName)
public boolean doesExist(java.lang.String name)
public User authenticate(Authentication authentication) throws AuthenticationFailedException
AuthenticationFailedException
public void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |