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 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:
      getMechanisms in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
      Returns:
      List of mechanism objects
    • getUsers

      public List<Principal> getUsers()
      Specified by:
      getUsers in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
    • deletePrincipal

      public boolean deletePrincipal(Principal principal) throws AccountNotFoundException
      Specified by:
      deletePrincipal in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
      Throws:
      AccountNotFoundException
    • getUser

      public Principal getUser(String username)
      Create Principal instance for a valid user
      Specified by:
      getUser in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
      Parameters:
      username - Principal username
      Returns:
      Principal instance
    • verifyPassword

      public boolean verifyPassword(String principal, char[] password) throws AccountNotFoundException
      Specified by:
      verifyPassword in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
      Throws:
      AccountNotFoundException
    • updatePassword

      public boolean updatePassword(Principal principal, char[] password) throws AccountNotFoundException
      Specified by:
      updatePassword in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
      Throws:
      AccountNotFoundException
    • createPrincipal

      public boolean createPrincipal(Principal principal, char[] password)
      Specified by:
      createPrincipal in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
    • reload

      public void reload() throws IOException
      Specified by:
      reload in interface org.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:
      setPassword in interface org.wso2.andes.server.security.auth.database.PrincipalDatabase
      Parameters:
      principal - Principal to be authenticated
      passwordCallback - Callback to set if the user is authenticated or not. This also holds user's password.
      Throws:
      IOException
      AccountNotFoundException
    • setPasswordFile

      public void setPasswordFile(String passwordFile)