|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.core.security.LocalSecurityManager
Implements security based off of configurations stored in the local database configuration.
Constructor Summary | |
LocalSecurityManager(Database db,
boolean disabled)
Initialize the security manager. |
Method Summary | |
Credentials |
authenticate(java.lang.String username,
java.lang.String password)
Authenticates the user and retrieves a credentials object for the provided username and password. |
void |
checkAccess(java.lang.String resource,
int requestedAccess)
Determines if the credentials retrieved from thread local storage are valid for accessing the specified resource. |
void |
checkAccess(java.lang.String resource,
int requestedAccess,
Credentials cred)
Determines if the provided credentials are valid for accessing the specified resource. |
Configuration |
getConfig()
getConfig retrieves the configuration information for the Configurable object instance. |
java.lang.String |
getName()
getName retrieves the contextually important name of the object |
void |
logout()
Removes any credentials associated with the current thread. |
void |
readConfig()
Reads the ACL security configuration from the database. |
void |
setActive()
|
void |
setConfig(Configuration config)
setConfig sets the configuration information for the Configurable object instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocalSecurityManager(Database db, boolean disabled)
db
- the Database instance associated with this managerdisabled
- whether security should be enabled or not. true to
disable.Method Detail |
public java.lang.String getName()
getName
in interface Named
public void checkAccess(java.lang.String resource, int requestedAccess, Credentials cred) throws AccessDeniedException, InvalidCredentialsException
checkAccess
in interface DBSecurityManager
resource
- The resource to check access for.requestedAccess
- The access level being requested.cred
- The credentials to use to authenticateAccessDeniedException
- Thrown when access to the resource is
denied.InvalidCredentialsException
- Thrown if the provided credentials
are not valid.public void checkAccess(java.lang.String resource, int requestedAccess) throws AccessDeniedException, InvalidCredentialsException
checkAccess
in interface DBSecurityManager
resource
- The resource to check access for.requestedAccess
- The access level being requested.cred
- The credentials to use to authenticateAccessDeniedException
- Thrown when access to the resource is
denied.InvalidCredentialsException
- Thrown if the credentials retrieved
from thread local storage are not valid.public Credentials authenticate(java.lang.String username, java.lang.String password) throws InvalidPasswordException, UnknownUserException, InvalidCredentialsException
authenticate
in interface DBSecurityManager
username
- The username to authenticatepassword
- The password used to authenticate the user.InvalidPasswordException
- Thrown when the password provided does
not match for the username.UnknownUserException
- Thrown when the username can not be found.public void logout()
logout
in interface DBSecurityManager
public void setActive()
setActive
in interface DBSecurityManager
public void readConfig()
readConfig
in interface DBSecurityManager
public void setConfig(Configuration config)
setConfig
in interface Configurable
config
- The configuration Nodepublic Configuration getConfig()
getConfig
in interface Configurable
|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |