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

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


        {
            return new PlainPasswordFilePrincipalDatabase();
        }
        else if (Base64MD5PasswordFilePrincipalDatabase.class.getName().equals(clazz))
        {
            return new Base64MD5PasswordFilePrincipalDatabase();
        }
        else
        {
            return null;
        }
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

    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

    }

    @Override
    PrincipalDatabase createPrincipalDatabase()
    {
        return new Base64MD5PasswordFilePrincipalDatabase();
    }
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.open(file);
        db.createPrincipal( createTestPrincipal("knownuser"), "guest".toCharArray());
        db.createPrincipal( createTestPrincipal("qpid3158user"), "guest2".toCharArray());
        return db;
    }
View Full Code Here

    }

    @Override
    protected PrincipalDatabase createDatabase()
    {
        return new Base64MD5PasswordFilePrincipalDatabase();
    }
View Full Code Here

    @Override
    protected void setUp() throws Exception
    {
        assertNotNull("QPID_HOME not set", _QPID_HOME);

        _database = new Base64MD5PasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
    }
View Full Code Here

    }

    @Override
    protected PrincipalDatabase createDatabase()
    {
        return new Base64MD5PasswordFilePrincipalDatabase();
    }
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.