Package org.apache.qpid.server.security.auth.sasl.crammd5

Examples of org.apache.qpid.server.security.auth.sasl.crammd5.CRAMMD5HashedServerFactory


    @Override
    protected void setUp() throws Exception
    {
        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();

        _saslServer = _saslFactory.createSaslServer(CRAMMD5HexSaslServer.MECHANISM,
                "AMQP",
                "localhost",
                _initializer.getProperties(),
                _initializer.getCallbackHandler());
        assertNotNull("Unable to create saslServer with mechanism type " + CRAMMD5HexSaslServer.MECHANISM, _saslServer);

    }
View Full Code Here


        {
            return new CRAMMD5HashedSaslServer(mechanism, "AMQP", localFQDN, null, callbackHandler);
        }
        else if(CRAMMD5HexSaslServer.MECHANISM.equals(mechanism))
        {
            return new CRAMMD5HexSaslServer(mechanism, "AMQP", localFQDN, null, callbackHandler);
        }

        throw new SaslException("Unsupported mechanism: " + mechanism);
    }
View Full Code Here

        {
            return new CRAMMD5HashedSaslServer(mechanism, "AMQP", localFQDN, null, callbackHandler);
        }
        else if(CRAMMD5HexSaslServer.MECHANISM.equals(mechanism))
        {
            return new CRAMMD5HexSaslServer(mechanism, "AMQP", localFQDN, null, callbackHandler);
        }

        throw new SaslException("Unsupported mechanism: " + mechanism);
    }
View Full Code Here

        {
            return new CRAMMD5HashedSaslServer(mechanism, "AMQP", localFQDN, null, callbackHandler);
        }
        else if(CRAMMD5HexSaslServer.MECHANISM.equals(mechanism))
        {
            return new CRAMMD5HexSaslServer(mechanism, "AMQP", localFQDN, null, callbackHandler);
        }
        else if(PlainSaslServer.MECHANISM.equals(mechanism))
        {
            return new PlainAdapterSaslServer(new PlainAdapterSaslServer.PasswordValidator()
            {
View Full Code Here

        Base64MD5PasswordFilePrincipalDatabase db = createTestPrincipalDatabase();
        assertEquals("Unexpected number of test users in the db", 2, db.getUsers().size());

        _initializer.initialise(db);

        _saslFactory = new CRAMMD5HexServerFactory();

        _saslServer = _saslFactory.createSaslServer(CRAMMD5HexSaslServer.MECHANISM,
                "AMQP",
                "localhost",
                _initializer.getProperties(),
View Full Code Here

        Base64MD5PasswordFilePrincipalDatabase db = createTestPrincipalDatabase();
        assertEquals("Unexpected number of test users in the db", 2, db.getUsers().size());

        _initializer.initialise(db);

        _saslFactory = new CRAMMD5HexServerFactory();

        _saslServer = _saslFactory.createSaslServer(CRAMMD5HexSaslServer.MECHANISM,
                "AMQP",
                "localhost",
                null,
View Full Code Here

        Base64MD5PasswordFilePrincipalDatabase db = createTestPrincipalDatabase();
        assertEquals("Unexpected number of test users in the db", 2, db.getUsers().size());

        _initializer.initialise(db);

        _saslFactory = new CRAMMD5HexServerFactory();

        _saslServer = _saslFactory.createSaslServer(CRAMMD5HexSaslServer.MECHANISM,
                "AMQP",
                "localhost",
                _initializer.getProperties(),
View Full Code Here

        Base64MD5PasswordFilePrincipalDatabase db = createTestPrincipalDatabase();
        assertEquals("Unexpected number of test users in the db", 2, db.getUsers().size());

        _initializer.initialise(db);

        _saslFactory = new CRAMMD5HexServerFactory();

        _saslServer = _saslFactory.createSaslServer(CRAMMD5HexSaslServer.MECHANISM,
                "AMQP",
                "localhost",
                _initializer.getProperties(),
View Full Code Here

    public PlainPasswordFilePrincipalDatabase()
    {
        /**
         *  Create Authenticators for Plain Password file.
         */
        super(new AmqPlainInitialiser(), new PlainInitialiser(), new CRAMMD5Initialiser());
    }
View Full Code Here

        //  Accept MD5 incomming and use plain comparison with the file
        PlainInitialiser cram = new PlainInitialiser();
        cram.initialise(this);
        // Accept Plain incomming and hash it for comparison to the file.
        CRAMMD5Initialiser plain = new CRAMMD5Initialiser();
        plain.initialise(this, CRAMMD5Initialiser.HashDirection.INCOMMING);

        _saslServers.put(plain.getMechanismName(), cram);
        _saslServers.put(cram.getMechanismName(), plain);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.auth.sasl.crammd5.CRAMMD5HashedServerFactory

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.