|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabase
public class PropertiesPrincipalDatabase
Constructor Summary | |
---|---|
PropertiesPrincipalDatabase(Properties users)
|
Method Summary | |
---|---|
boolean |
createPrincipal(Principal principal,
char[] password)
Create a new principal in the database |
boolean |
deletePrincipal(Principal principal)
Delete a principal |
Map<String,AuthenticationProviderInitialiser> |
getMechanisms()
|
Principal |
getUser(String username)
Get the principal from the database with the given username |
List<Principal> |
getUsers()
|
void |
reload()
Reload the database to its ensure contents are up to date |
void |
setPassword(Principal principal,
PasswordCallback callback)
Set the password for a given principal in the specified callback. |
boolean |
updatePassword(Principal principal,
char[] password)
Update(Change) the password for the given principal |
boolean |
verifyPassword(String principal,
char[] password)
Used to verify that the presented Password is correct. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesPrincipalDatabase(Properties users)
Method Detail |
---|
public void setPassword(Principal principal, PasswordCallback callback) throws IOException, AccountNotFoundException
PrincipalDatabase
setPassword
in interface PrincipalDatabase
principal
- the principalcallback
- the password callback that wants to receive the password
IOException
- if there was an error looking up the principal
AccountNotFoundException
- if the account for specified principal could not be foundpublic boolean verifyPassword(String principal, char[] password) throws AccountNotFoundException
PrincipalDatabase
verifyPassword
in interface PrincipalDatabase
principal
- The principal to authenticatepassword
- The password to check
AccountNotFoundException
- if the principal cannot be foundpublic boolean updatePassword(Principal principal, char[] password) throws AccountNotFoundException
PrincipalDatabase
updatePassword
in interface PrincipalDatabase
principal
- Who's password is to be changedpassword
- The new password to use
AccountNotFoundException
- If the given principal doesn't exist in the Databasepublic boolean createPrincipal(Principal principal, char[] password)
PrincipalDatabase
createPrincipal
in interface PrincipalDatabase
principal
- The principal to createpassword
- The password to set for the principal
public boolean deletePrincipal(Principal principal) throws AccountNotFoundException
PrincipalDatabase
deletePrincipal
in interface PrincipalDatabase
principal
- The principal to delete
AccountNotFoundException
- If the given principal doesn't exist in the Databasepublic Map<String,AuthenticationProviderInitialiser> getMechanisms()
getMechanisms
in interface PrincipalDatabase
public List<Principal> getUsers()
getUsers
in interface PrincipalDatabase
public Principal getUser(String username)
PrincipalDatabase
getUser
in interface PrincipalDatabase
username
- of the principal to lookup
public void reload() throws IOException
PrincipalDatabase
reload
in interface PrincipalDatabase
IOException
- If there was an error reloading the database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |