Search in sources :

Example 6 with Dn

use of org.apache.directory.shared.ldap.model.name.Dn in project activemq-artemis by apache.

the class CachedLDAPAuthorizationModuleLegacyTest method getLdapConnection.

@Override
protected LdapConnection getLdapConnection() throws LdapException, IOException {
    LdapConnection connection = new LdapNetworkConnection("localhost", getLdapServer().getPort());
    connection.bind(new Dn("uid=admin,ou=system"), "secret");
    return connection;
}
Also used : Dn(org.apache.directory.shared.ldap.model.name.Dn) LdapNetworkConnection(org.apache.directory.ldap.client.api.LdapNetworkConnection) LdapConnection(org.apache.directory.ldap.client.api.LdapConnection)

Example 7 with Dn

use of org.apache.directory.shared.ldap.model.name.Dn in project activemq-artemis by apache.

the class CachedLDAPAuthorizationModuleOpenLDAPTest method getLdapConnection.

@Override
protected LdapConnection getLdapConnection() throws LdapException, IOException {
    LdapConnection connection = new LdapNetworkConnection(LDAP_HOST, LDAP_PORT);
    connection.bind(new Dn(LDAP_USER), LDAP_PASS);
    return connection;
}
Also used : Dn(org.apache.directory.shared.ldap.model.name.Dn) LdapNetworkConnection(org.apache.directory.ldap.client.api.LdapNetworkConnection) LdapConnection(org.apache.directory.ldap.client.api.LdapConnection)

Aggregations

Dn (org.apache.directory.shared.ldap.model.name.Dn)7 LdapConnection (org.apache.directory.ldap.client.api.LdapConnection)4 LdapNetworkConnection (org.apache.directory.ldap.client.api.LdapNetworkConnection)4 ActiveMQQueue (org.apache.activemq.command.ActiveMQQueue)3 Test (org.junit.Test)3 Rdn (org.apache.directory.shared.ldap.model.name.Rdn)2 ModifyRequest (org.apache.directory.shared.ldap.model.message.ModifyRequest)1 ModifyRequestImpl (org.apache.directory.shared.ldap.model.message.ModifyRequestImpl)1