spring-ldap icon indicating copy to clipboard operation
spring-ldap copied to clipboard

doGetContext should use returned DirContext processContextAfterCreation

Open AmirWiener opened this issue 9 years ago • 1 comments
trafficstars

to enable the startTLS to close the session.

One may want to use a org.springframework.ldap.core.support.AbstractTlsDirContextAuthenticationStrategy as authenticationStrategy, and set its shutdownTlsGracefully flag to true. Now, calling authenticationStrategy.processContextAfterCreation from doGetContext should return a proxy DirContext which will hold a TlsAwareDirContextProxy with the ldap context he had opend. calling to 'close' of the contex whould now call also to 'close' of the ldap context. (This is needed when using ldap protocol with startTls. Some configurations reqiers the caller to shutdown Tls gracefully) The returned DirContext proxy is now the one to be returned from doGetContext, and not ignored as before.

AmirWiener avatar Jul 12 '16 13:07 AmirWiener

I have this fix for it: https://github.com/AmirWiener/spring-ldap/pull/1

AmirWiener avatar Jul 12 '16 13:07 AmirWiener