|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.server.security.AbstractSecurityManager
com.sibvisions.rad.server.security.DBSecurityManager
public class DBSecurityManager
The DBSecurityManager uses a database to validate/authenticate users.
It requires the following information to establish a database connection:
IConnectionConstants.PREFIX_CLIENT + "login.auto" should be set to true when the user logs on.
After a successful logon the property: IConnectionConstants.PREFIX_CLIENT + "login.key" will be set to
a unique login key. The client should store the key in its local registry. When the property
IConnectionConstants.PREFIX_CLIENT + "login.key" is set before opening the connection, then the user will be logged in
if the login is possible!
| Field Summary | |
|---|---|
protected static String |
TABLE_AUTOLOGIN
the name of the autologin table. |
protected static String |
TABLE_USERS
the name of the users table. |
| Constructor Summary | |
|---|---|
DBSecurityManager()
|
|
| Method Summary | |
|---|---|
void |
changePassword(ISession pSession)
Changes the password for a user. |
protected void |
finalize()
|
protected boolean |
isActive(ISession pSession,
String pActive)
Checks if a user is active. |
protected boolean |
isChangePassword(ISession pSession,
String pChangePassword)
Checks if the change password flag is set. |
protected boolean |
isPasswordValid(ISession pSession,
String pPassword)
Checks if the user password is valid. |
protected boolean |
isValid(ISession pSession,
Timestamp pFrom,
Timestamp pTo)
Checks if a user is valid. |
void |
logout(ISession pSession)
Performs a manual or automatic logout. |
protected Connection |
openConnection(ISession pSession)
Opens a database connection to the database of an application. |
void |
validateAuthentication(ISession pSession)
Validates if a session has valid credentials to access an application. |
| Methods inherited from class com.sibvisions.rad.server.security.AbstractSecurityManager |
|---|
checkPassword, comparePassword, getPasswordValidator, validatePassword |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String TABLE_USERS
protected static final String TABLE_AUTOLOGIN
| Constructor Detail |
|---|
public DBSecurityManager()
| Method Detail |
|---|
public void validateAuthentication(ISession pSession)
throws Exception
pSession - the session which needs access
Exception - if the access is denied (invalid username or password, password needs to be changed, ...)
public void changePassword(ISession pSession)
throws Exception
pSession - the session which wants to change the password
Exception - if it's not possible to change the passwordpublic void logout(ISession pSession)
pSession - the session which performs the logout
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
protected Connection openConnection(ISession pSession)
throws Exception
pSession - the session for which the connection should be opened
Exception - if the application zone is invalid or the connection can not be opened
IllegalArgumentException - if the database configuration is invalid (parameters are missing, ...)
protected boolean isActive(ISession pSession,
String pActive)
throws Exception
pSession - the session which needs accesspActive - the active flag or null if the flag is not available
true if the active flag is missing or the flag equals the yes value
Exception - if the configuration of the session is invalid
protected boolean isValid(ISession pSession,
Timestamp pFrom,
Timestamp pTo)
pSession - the session which needs accesspFrom - the from date/time or null for undefinedpTo - the to date/time or null for undefined
true if the from/to combination is possible, false otherwise
protected boolean isPasswordValid(ISession pSession,
String pPassword)
pSession - the session which needs accesspPassword - the configured password
true if the user password is valid
protected boolean isChangePassword(ISession pSession,
String pChangePassword)
throws Exception
pSession - the session which needs accesspChangePassword - the change password flag or null if the flag is not available
true if the change password flag is set or false if the flag is
null or is not set
Exception - if the configuration of the session is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||