public class SecurityManagerSecurityOps extends java.lang.Object implements CustomSecurityOps
This is the default handler for SecurityOps for user related methods.
| Constructor and Description |
|---|
SecurityManagerSecurityOps() |
| Modifier and Type | Method and Description |
|---|---|
int |
getAuthLevel(java.lang.String ldbname)
Check the access level for a database.
|
java.lang.String |
getUserId()
Returns the userid associated with the current user from the SecurityManager instance.
|
java.lang.String |
getUserIdFromDB(java.lang.String dbname)
Returns the userid associated with the current user of the given logical database.
|
boolean |
hasAccessToDatabase(java.lang.String ldbName)
Checks if the currently authenticated user has access to a database.
|
boolean |
setUserId(java.lang.String userid,
java.lang.String password)
Authenticates the user for specified DB connection.
|
boolean |
setUserId(java.lang.String userid,
java.lang.String password,
java.lang.String dbname)
Authenticates the user for specified DB connection.
|
void |
setUserIdDirect(java.lang.String userid,
java.lang.String dbname,
boolean lock)
Sets the specified user ID directly, without authentication, for the given database.
|
public java.lang.String getUserId()
getUserId in interface CustomSecurityOpspublic java.lang.String getUserIdFromDB(java.lang.String dbname)
getUserIdFromDB in interface CustomSecurityOpsdbname - Logical database name.public boolean setUserId(java.lang.String userid,
java.lang.String password)
setUserId in interface CustomSecurityOpsuserid - The name of the user to set as UserID.password - The users password.true as the SecurityManager is not database dependent.public void setUserIdDirect(java.lang.String userid,
java.lang.String dbname,
boolean lock)
This implementation is a no-op.
setUserIdDirect in interface CustomSecurityOpsuserid - The name of the user to set as UserID.dbname - Logical database name.lock - Flag indicating that the database should be lockedpublic boolean setUserId(java.lang.String userid,
java.lang.String password,
java.lang.String dbname)
setUserId in interface CustomSecurityOpsuserid - The name of the user to set as UserID.password - The users password.dbname - Logical database name.true as the SecurityManager is not database dependent.public int getAuthLevel(java.lang.String ldbname)
getAuthLevel in interface CustomSecurityOpsldbname - The database to query.public boolean hasAccessToDatabase(java.lang.String ldbName)
hasAccessToDatabase in interface CustomSecurityOpsldbName - The logical name of the database.true.