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.PrincipalDatabase
public List<Principal> getUsers()
getUsers
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
public boolean deletePrincipal(Principal principal) throws AccountNotFoundException
deletePrincipal
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
AccountNotFoundException
public Principal getUser(String username)
getUser
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
username
- Principal usernamepublic boolean verifyPassword(String principal, char[] password) throws AccountNotFoundException
verifyPassword
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
AccountNotFoundException
public boolean updatePassword(Principal principal, char[] password) throws AccountNotFoundException
updatePassword
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
AccountNotFoundException
public boolean createPrincipal(Principal principal, char[] password)
createPrincipal
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
public void reload() throws IOException
reload
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
IOException
public void setPassword(Principal principal, PasswordCallback passwordCallback) throws IOException, AccountNotFoundException
setPassword
in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
principal
- Principal to be authenticatedpasswordCallback
- Callback to set if the user is authenticated or not. This also holds user's password.IOException
AccountNotFoundException
public void setPasswordFile(String passwordFile)
Copyright © 2024 WSO2. All rights reserved.