org.apache.xindice.core.security
Interface DBSecurityManager
- All Superinterfaces:
- Configurable, Named
- All Known Implementing Classes:
- LocalSecurityManager
- public interface DBSecurityManager
- extends Named, Configurable
SecurityManager is the interface to the access control functionality of the
server.
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. |
void |
logout()
Removes any credentials associated with the current thread. |
void |
readConfig()
Reads the security managers configuration and prepares it for operation. |
void |
setActive()
|
Methods inherited from interface org.apache.xindice.util.Named |
getName |
checkAccess
public void checkAccess(java.lang.String resource,
int requestedAccess,
Credentials cred)
throws AccessDeniedException,
InvalidCredentialsException
- Determines if the provided credentials are valid for accessing the
specified resource.
- Parameters:
resource
- The resource to check access for.requestedAccess
- The access level being requested.cred
- The credentials to use to authenticate- Throws:
AccessDeniedException
- Thrown when access to the resource is
denied.InvalidCredentialsException
- Thrown if the provided credentials
are not valid.
checkAccess
public void checkAccess(java.lang.String resource,
int requestedAccess)
throws AccessDeniedException,
InvalidCredentialsException
- Determines if the credentials retrieved from thread local storage are
valid for accessing the specified resource.
- Parameters:
resource
- The resource to check access for.requestedAccess
- The access level being requested.cred
- The credentials to use to authenticate- Throws:
AccessDeniedException
- Thrown when access to the resource is
denied.InvalidCredentialsException
- Thrown if the credentials retrieved
from thread local storage are not valid.
authenticate
public Credentials authenticate(java.lang.String username,
java.lang.String password)
throws InvalidPasswordException,
UnknownUserException,
InvalidCredentialsException
- Authenticates the user and retrieves a credentials object for the
provided username and password. If
an existing object can be found in the cache it will be returned otherwise
a new Credentials instance will be created and returned. Cached objects
are verified before being returned.
- Parameters:
username
- The username to authenticatepassword
- The password used to authenticate the user.- Throws:
InvalidPasswordException
- Thrown when the password provided does
not match for the username.UnknownUserException
- Thrown when the username can not be found.
logout
public void logout()
- Removes any credentials associated with the current thread. Any further
access by the thread will result in a InvalidCredentialsException being
thrown.
readConfig
public void readConfig()
- Reads the security managers configuration and prepares it for operation.
setActive
public void setActive()
Copyright (c) 1999-2001 The Apache Software Foundation