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.
|
public java.lang.String getUserId()
getUserId
in interface CustomSecurityOps
public java.lang.String getUserIdFromDB(java.lang.String dbname)
getUserIdFromDB
in interface CustomSecurityOps
dbname
- Logical database name.public boolean setUserId(java.lang.String userid, java.lang.String password)
setUserId
in interface CustomSecurityOps
userid
- The name of the user to set as UserID.password
- The users password.true
as the SecurityManager is not database dependent.public boolean setUserId(java.lang.String userid, java.lang.String password, java.lang.String dbname)
setUserId
in interface CustomSecurityOps
userid
- 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 CustomSecurityOps
ldbname
- The database to query.public boolean hasAccessToDatabase(java.lang.String ldbName)
hasAccessToDatabase
in interface CustomSecurityOps
ldbName
- The logical name of the database.true
.