mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Yannick Lecaillez
03.15.2016 aaa73b388f25a55f7902e0b9f6630fea83b59741
OPENDJ-3077: Http Basic authorization must use the LDAPContext to get a
connection

The HttpBasicAuthenticationMechanism allocated a connection to the
directory server from the ConnectionFactory while it should get it from
the LDAPContext to be able to perform multiple concurrent asynchronous
LDAP requests and for tracking.
1 files modified
3 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/protocols/http/authz/HttpBasicAuthorizationMechanism.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/protocols/http/authz/HttpBasicAuthorizationMechanism.java
@@ -127,8 +127,7 @@
      {
        final Entry userEntry = getMappedIdentity(username);
        doBind(userEntry.getName().toString(), password);
        final Connection connection =
            parentContext.asContext(LDAPContext.class)
        final Connection connection = parentContext.asContext(LDAPContext.class)
                         .getInternalConnectionFactory()
                         .getAuthenticatedConnection(userEntry);
        final Context authcContext = new AuthenticatedConnectionContext(parentContext, connection);