|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.util.SimpleUserHandler
public class SimpleUserHandler
This is a class that handles users authentication using a simple text file.
| Constructor Summary | |
|---|---|
SimpleUserHandler()
|
|
| Method Summary | |
|---|---|
Map<String,String> |
getUsers()
Return the hash of users. |
boolean |
isValidUser(String username,
String password)
Check if a user/password combination is valid. |
Map<String,String> |
loadUsers(Reader r)
Load the users from the given Reader. |
void |
saveUsers(Reader r)
Saves the users from the given Reader. |
void |
setFile(String userFile)
Set the file to use for users, will read the files. |
void |
setUsers(Map<String,String> users)
Return the hash of users. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleUserHandler()
| Method Detail |
|---|
public void setFile(String userFile)
userFile - the filename to read the users from.
public Map<String,String> loadUsers(Reader r)
throws IOException
r - the Reader with the users.
IOException
public void saveUsers(Reader r)
throws IOException
r - the Reader with the users.
IOExceptionpublic Map<String,String> getUsers()
public void setUsers(Map<String,String> users)
public boolean isValidUser(String username,
String password)
username - the username.password - the decrypted password.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||