|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PrincipalDatabase
Represents a "user database" which is really a way of storing principals (i.e. usernames) and passwords.
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. |
Method Detail |
---|
void setPassword(Principal principal, PasswordCallback callback) throws IOException, AccountNotFoundException
principal
- the principalcallback
- the password callback that wants to receive the password
AccountNotFoundException
- if the account for specified principal could not be found
IOException
- if there was an error looking up the principalboolean verifyPassword(String principal, char[] password) throws AccountNotFoundException
principal
- The principal to authenticatepassword
- The password to check
AccountNotFoundException
- if the principal cannot be foundboolean updatePassword(Principal principal, char[] password) throws AccountNotFoundException
principal
- Who's password is to be changedpassword
- The new password to use
AccountNotFoundException
- If the given principal doesn't exist in the Databaseboolean createPrincipal(Principal principal, char[] password)
principal
- The principal to createpassword
- The password to set for the principal
boolean deletePrincipal(Principal principal) throws AccountNotFoundException
principal
- The principal to delete
AccountNotFoundException
- If the given principal doesn't exist in the DatabasePrincipal getUser(String username)
username
- of the principal to lookup
void reload() throws IOException
IOException
- If there was an error reloading the databaseMap<String,AuthenticationProviderInitialiser> getMechanisms()
List<Principal> getUsers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |