Package no.polaric.core.auth
Class LocalUsers
java.lang.Object
no.polaric.core.auth.LocalUsers
- All Implemented Interfaces:
UserDb
,ServerConfig.UserDb
User info stored locally in a file.
Saved to file periodically. Stores instances of the User class (subclassed here).
Note that password-hashes are stored in a separate file.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface no.polaric.core.auth.UserDb
UserDb.DummySyncer, UserDb.Syncer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a user.add
(String userid, String name, boolean admin, boolean suspend, String passwd, String group, String agrp) Get a single user.getAll()
Get all users as a collection.boolean
void
Remove a user.void
restore()
Restore from a file.void
save()
Store everything in a file.void
boolean
updatePasswd
(String username, String passwd)
-
Constructor Details
-
LocalUsers
-
-
Method Details
-
setSyncer
-
getSyncer
-
getGroupDb
- Specified by:
getGroupDb
in interfaceUserDb
-
hasUser
- Specified by:
hasUser
in interfaceServerConfig.UserDb
-
get
Get a single user. -
getAll
Get all users as a collection. -
add
Add a user. -
add
-
add
public LocalUsers.User add(String userid, String name, boolean admin, boolean suspend, String passwd, String group) -
remove
Remove a user. Also remove entry in password-file. -
updatePasswd
- Specified by:
updatePasswd
in interfaceUserDb
-
save
public void save()Store everything in a file. -
restore
public void restore()Restore from a file.
-