Class CarbonBasedPrincipalDatabase
java.lang.Object
org.wso2.carbon.andes.authentication.andes.CarbonBasedPrincipalDatabase
- All Implemented Interfaces:
org.wso2.andes.server.security.auth.database.PrincipalDatabase
public class CarbonBasedPrincipalDatabase
extends Object
implements org.wso2.andes.server.security.auth.database.PrincipalDatabase
Carbon-based principal database for Apache Qpid. This uses Carbon user manager to handle authentication
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreatePrincipal(Principal principal, char[] password) booleandeletePrincipal(Principal principal) Get list of SASL mechanism objects.Create Principal instance for a valid usergetUsers()voidreload()voidsetPassword(Principal principal, PasswordCallback passwordCallback) This method sets of a given principal is authenticated or not.voidsetPasswordFile(String passwordFile) booleanupdatePassword(Principal principal, char[] password) booleanverifyPassword(String principal, char[] password)
-
Constructor Details
-
CarbonBasedPrincipalDatabase
public CarbonBasedPrincipalDatabase()
-
-
Method Details
-
getMechanisms
public Map<String,org.wso2.andes.server.security.auth.sasl.AuthenticationProviderInitialiser> getMechanisms()Get list of SASL mechanism objects. We only use PLAIN.- Specified by:
getMechanismsin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Returns:
- List of mechanism objects
-
getUsers
- Specified by:
getUsersin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase
-
deletePrincipal
- Specified by:
deletePrincipalin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Throws:
AccountNotFoundException
-
getUser
Create Principal instance for a valid user- Specified by:
getUserin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Parameters:
username- Principal username- Returns:
- Principal instance
-
verifyPassword
- Specified by:
verifyPasswordin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Throws:
AccountNotFoundException
-
updatePassword
- Specified by:
updatePasswordin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Throws:
AccountNotFoundException
-
createPrincipal
- Specified by:
createPrincipalin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase
-
reload
- Specified by:
reloadin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Throws:
IOException
-
setPassword
public void setPassword(Principal principal, PasswordCallback passwordCallback) throws IOException, AccountNotFoundException This method sets of a given principal is authenticated or not.- Specified by:
setPasswordin interfaceorg.wso2.andes.server.security.auth.database.PrincipalDatabase- Parameters:
principal- Principal to be authenticatedpasswordCallback- Callback to set if the user is authenticated or not. This also holds user's password.- Throws:
IOExceptionAccountNotFoundException
-
setPasswordFile
-