Package org.apache.qpid.server.security.auth.database

Examples of org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase


        super.setUp();

        CRAMMD5HexInitialiser _initializer = new CRAMMD5HexInitialiser();

        //Use properties to create a PrincipalDatabase
        Base64MD5PasswordFilePrincipalDatabase db = createTestPrincipalDatabase();
        assertEquals("Unexpected number of test users in the db", 2, db.getUsers().size());

        _initializer.initialise(db);

        _saslFactory = new CRAMMD5HexServerFactory();
View Full Code Here


     * @return
     * @throws IOException
     */
    private Base64MD5PasswordFilePrincipalDatabase createTestPrincipalDatabase() throws IOException
    {
        Base64MD5PasswordFilePrincipalDatabase db = new Base64MD5PasswordFilePrincipalDatabase();
        File file = File.createTempFile("passwd", "db");
        file.deleteOnExit();
        db.setPasswordFile(file.getCanonicalPath());
        db.createPrincipal( createTestPrincipal("knownuser"), "guest".toCharArray());
        db.createPrincipal( createTestPrincipal("qpid3158user"), "guest2".toCharArray());
        return db;
    }
View Full Code Here

    protected void setUp() throws Exception
    {
        _rmipa = new RMIPasswordAuthenticator();
       
        _md5Pd = new Base64MD5PasswordFilePrincipalDatabase();
        _md5PwdFile = createTempPasswordFile(this.getClass().getName()+"md5pwd", USERNAME, B64_MD5HASHED_PASSWORD);
        _md5Pd.setPasswordFile(_md5PwdFile.getAbsolutePath());
       
        _plainPd = new PlainPasswordFilePrincipalDatabase();
        _plainPwdFile = createTempPasswordFile(this.getClass().getName()+"plainpwd", USERNAME, PASSWORD);
View Full Code Here

    public void perform(String user, char[] password) throws Exception
    {
        CRAMMD5HexInitialiser initialiser = new CRAMMD5HexInitialiser();

        PrincipalDatabase db = new Base64MD5PasswordFilePrincipalDatabase();
        db.open(_file);
        initialiser.initialise(db);

        PasswordCallback passwordCallback = new PasswordCallback("password:", false);
        NameCallback usernameCallback = new NameCallback("user:", user);
View Full Code Here

        super.setUp();

        CRAMMD5HexInitialiser _initializer = new CRAMMD5HexInitialiser();

        //Use properties to create a PrincipalDatabase
        Base64MD5PasswordFilePrincipalDatabase db = createTestPrincipalDatabase();
        assertEquals("Unexpected number of test users in the db", 2, db.getUsers().size());

        _initializer.initialise(db);

        _saslFactory = new CRAMMD5HexServerFactory();
View Full Code Here

     * @return
     * @throws IOException
     */
    private Base64MD5PasswordFilePrincipalDatabase createTestPrincipalDatabase() throws IOException
    {
        Base64MD5PasswordFilePrincipalDatabase db = new Base64MD5PasswordFilePrincipalDatabase();
        File file = File.createTempFile("passwd", "db");
        file.deleteOnExit();
        db.setPasswordFile(file.getCanonicalPath());
        db.createPrincipal( createTestPrincipal("knownuser"), "guest".toCharArray());
        db.createPrincipal( createTestPrincipal("qpid3158user"), "guest2".toCharArray());
        return db;
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.