public class CarbonBasedPrincipalDatabase extends Object implements org.wso2.andes.server.security.auth.database.PrincipalDatabase
| Constructor and Description |
|---|
CarbonBasedPrincipalDatabase() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createPrincipal(Principal principal,
char[] password) |
boolean |
deletePrincipal(Principal principal) |
Map<String,org.wso2.andes.server.security.auth.sasl.AuthenticationProviderInitialiser> |
getMechanisms()
Get list of SASL mechanism objects.
|
Principal |
getUser(String username)
Create Principal instance for a valid user
|
List<Principal> |
getUsers() |
void |
reload() |
void |
setPassword(Principal principal,
PasswordCallback passwordCallback)
This method sets of a given principal is authenticated or not.
|
void |
setPasswordFile(String passwordFile) |
boolean |
updatePassword(Principal principal,
char[] password) |
boolean |
verifyPassword(String principal,
char[] password) |
public Map<String,org.wso2.andes.server.security.auth.sasl.AuthenticationProviderInitialiser> getMechanisms()
getMechanisms in interface org.wso2.andes.server.security.auth.database.PrincipalDatabasepublic List<Principal> getUsers()
getUsers in interface org.wso2.andes.server.security.auth.database.PrincipalDatabasepublic boolean deletePrincipal(Principal principal) throws AccountNotFoundException
deletePrincipal in interface org.wso2.andes.server.security.auth.database.PrincipalDatabaseAccountNotFoundExceptionpublic Principal getUser(String username)
getUser in interface org.wso2.andes.server.security.auth.database.PrincipalDatabaseusername - Principal usernamepublic boolean verifyPassword(String principal, char[] password) throws AccountNotFoundException
verifyPassword in interface org.wso2.andes.server.security.auth.database.PrincipalDatabaseAccountNotFoundExceptionpublic boolean updatePassword(Principal principal, char[] password) throws AccountNotFoundException
updatePassword in interface org.wso2.andes.server.security.auth.database.PrincipalDatabaseAccountNotFoundExceptionpublic boolean createPrincipal(Principal principal, char[] password)
createPrincipal in interface org.wso2.andes.server.security.auth.database.PrincipalDatabasepublic void reload()
throws IOException
reload in interface org.wso2.andes.server.security.auth.database.PrincipalDatabaseIOExceptionpublic void setPassword(Principal principal, PasswordCallback passwordCallback) throws IOException, AccountNotFoundException
setPassword in interface org.wso2.andes.server.security.auth.database.PrincipalDatabaseprincipal - Principal to be authenticatedpasswordCallback - Callback to set if the user is authenticated or not. This also holds user's password.IOException - If there was an error looking up the principalAccountNotFoundException - If the account for specified principal could not be foundpublic void setPasswordFile(String passwordFile)
Copyright © 2017 WSO2. All rights reserved.