Package org.apache.qpid.server.model

Examples of org.apache.qpid.server.model.AuthenticationProvider


    public void testPlainInstanceCreated() throws Exception
    {
        _configuration.put(AuthenticationProvider.TYPE, PlainPasswordDatabaseAuthenticationManager.PROVIDER_TYPE);
        _configuration.put("path", _emptyPasswordFile.getAbsolutePath());

        AuthenticationProvider manager = _factory.create(AuthenticationProvider.class, _configuration, _broker);
        assertNotNull(manager);
        assertTrue(manager instanceof PrincipalDatabaseAuthenticationManager);
        assertTrue(((PrincipalDatabaseAuthenticationManager)manager).getPrincipalDatabase() instanceof PlainPasswordFilePrincipalDatabase);
    }
View Full Code Here


        _configuration.put(AuthenticationProvider.TYPE, PlainPasswordDatabaseAuthenticationManager.PROVIDER_TYPE);
        _configuration.put("path", _emptyPasswordFile.getAbsolutePath());


        AuthenticationProvider manager = _factory.create(AuthenticationProvider.class, _configuration, _broker);

        assertNotNull(manager);
        assertTrue(manager instanceof PrincipalDatabaseAuthenticationManager);
        assertTrue(((PrincipalDatabaseAuthenticationManager)manager).getPrincipalDatabase() instanceof PlainPasswordFilePrincipalDatabase);
    }
View Full Code Here

    {
        _configuration.put(AuthenticationProvider.TYPE, PlainPasswordDatabaseAuthenticationManager.PROVIDER_TYPE);

        try
        {
            AuthenticationProvider manager = _factory.create(AuthenticationProvider.class, _configuration, _broker);
            fail("No authentication manager should be created");
        }
        catch (IllegalArgumentException e)
        {
            // pass;
View Full Code Here

    {
        _configuration.put(AuthenticationProvider.TYPE, SimpleLDAPAuthenticationManager.PROVIDER_TYPE);
        _configuration.put("providerUrl", "ldap://example.com:389/");
        _configuration.put("searchContext", "dc=example");

        AuthenticationProvider manager = _factory.create(AuthenticationProvider.class, _configuration, _broker);
        assertNotNull(manager);

    }
View Full Code Here

    {
        _configuration.put(AuthenticationProvider.TYPE, SimpleLDAPAuthenticationManager.PROVIDER_TYPE);
        _configuration.put("providerUrl", "ldaps://example.com:636/");
        _configuration.put("searchContext", "dc=example");

        AuthenticationProvider manager = _factory.create(AuthenticationProvider.class, _configuration, _broker);
        assertNotNull(manager);

    }
View Full Code Here

        _configuration.put(AuthenticationProvider.TYPE, SimpleLDAPAuthenticationManager.PROVIDER_TYPE);
        _configuration.put("providerUrl", "ldaps://example.com:636/");
        _configuration.put("searchContext", "dc=example");
        _configuration.put("trustStore", "mytruststore");

        AuthenticationProvider manager = _factory.create(AuthenticationProvider.class, _configuration, _broker);
        assertNotNull(manager);
    }
View Full Code Here

    }

    public void testGetAuthenticationProvider()
    {
        SocketAddress localAddress = InetSocketAddress.createUnresolved("localhost", 8080);
        AuthenticationProvider brokerAuthenticationProvider = mock(AuthenticationProvider.class);
        when(_broker.getAuthenticationProvider(localAddress)).thenReturn(brokerAuthenticationProvider);
        AuthenticationProvider authenticationProvider = _management.getAuthenticationProvider(localAddress);
        assertEquals("Unexpected subject creator", brokerAuthenticationProvider, authenticationProvider);
    }
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();
        _broker = BrokerTestHelper.createBrokerMock();

        AuthenticationProvider dummyAuthProvider = mock(AuthenticationProvider.class);
        when(dummyAuthProvider.getName()).thenReturn("dummy");
        when(dummyAuthProvider.getId()).thenReturn(UUID.randomUUID());
        when(_broker.getChildren(eq(AuthenticationProvider.class))).thenReturn(Collections.singleton(dummyAuthProvider));
        _vhosts = new HashMap<>();
        for(String name : new String[] { "red", "blue", "purple", "black" })
        {
            _vhosts.put(name, BrokerTestHelper.createVirtualHost(name, _broker));
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.model.AuthenticationProvider

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.