|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServerUserDatabase
Interface used by OpenSMUS for user authentication, using the internal database system or an SQL source.
The database backend used for user authentication is configured in the OpenSMUS.cfg file.
Use the getServerUserDatabase() method of the ServerObject interface to acquire this object.
Field Summary | |
---|---|
static int |
AUTHENTICATION_NONE
|
static int |
AUTHENTICATION_OPTIONAL
|
static int |
AUTHENTICATION_REQUIRED
|
Method Summary | |
---|---|
int |
checkLogin(MUSUser oneUser,
java.lang.String username,
java.lang.String password)
Checks if a user/pass combination is valid and sets the userlevel |
boolean |
createUser(java.lang.String usernamein,
java.lang.String password,
java.lang.String userlevel)
Creates a user record in the user database |
boolean |
deleteDBUser(int userid)
Deletes the user with the specified user id from the database. |
int |
getDBUser(java.lang.String usernamein)
Returns the integer id for the user in the database. |
int |
getDBUserLevel(int userid)
Retrieves the user access level |
java.lang.String |
getDBUserPassword(int userid)
Retrieves the user password |
boolean |
isEnabled()
Checks if the user database is enabled. |
void |
updateUserLastLoginTime(int userid)
Updates the last login time for this user in the database to the current time. |
Field Detail |
---|
static final int AUTHENTICATION_NONE
static final int AUTHENTICATION_OPTIONAL
static final int AUTHENTICATION_REQUIRED
Method Detail |
---|
boolean createUser(java.lang.String usernamein, java.lang.String password, java.lang.String userlevel)
usernamein
- Username string, will be converted to uppercase for storagepassword
- Password stringuserlevel
- User access level as a string. Usual values are between 20 and 100.
void updateUserLastLoginTime(int userid)
userid
- User id integer retrieved by the getDBUser method.int getDBUser(java.lang.String usernamein) throws DBException, UserNotFoundException
usernamein
- Username string
DBException
UserNotFoundException
boolean deleteDBUser(int userid)
userid
- User id integer retrieved by the getDBUser method.
int getDBUserLevel(int userid) throws DBException
userid
- User id integer retrieved by the getDBUser method.
DBException
java.lang.String getDBUserPassword(int userid) throws DBException
userid
- User id integer retrieved by the getDBUser method.
DBException
int checkLogin(MUSUser oneUser, java.lang.String username, java.lang.String password)
oneUser
- The user object that will have the userlevel setusername
- password
-
boolean isEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |