[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Java LDAP API issues
Steven Sonntag wrote:
>
> > 8.
> > > It seems that the LDAPRebind interface would be easier to implement if
> > > additional data were provided in the new LDAPConnection object. Such as:
> > >
> > > 1. A reference to the LDAPSocketFactory class from the original LDAPConnection
> > > object. This allows it to connect in the same way as the original connection.
> > > 2. An LDAPConstraints object containing a reference to the LDAPRebind object
> > > from the original LDAPConnection object. The LDAPBind.bind() method may
> > > want to get authentication information using and LDAPRebindAuth object, and
> > > this gives it a way to do that.
> > > 3. The protocol version used in the connect/bind of the original object. This allows
> > > The LDAPBind.bind function to bind with same protocol version used in the
> > > original connection.
> > > 4. The mechanism used when binding. This could be the mechanism used on the
> > > bind in the original LDAPConnection object, or perhaps LDAPRebindAuth could
> > > be modified to provide the triplet - UserDN, Password, and Mechanism for the
> > > specified host.
> > >
> > > IMO the above changes would give the application, using explicit bind, greater flexibility
> > > when dealing with referrals / continuation references during automatic referral
> > > following:
> > >
> >
> > It's questionable that this is necessary. Can't you do all that with LDAPBind (rather than LDAPRebind)?
> >
> > If it really is required (which duplicates what you can do with LDAPBind), how about the following instead (let the implementation pull whatever it needs from the original connection, as LDAPBind does)?
> >
> > LDAPConnection bind(String ldapurl, LDAPConnection origConn);
>
> Sorry, I was saying Rebind, but meaning LDAPBind. Your solution is a
> good one and resolves my concerns.
> Does there need to be a way to get protocol version from the
> LDAPConnection for the use of LDAPBind?
>
> -Steve
In our implementation, you can get the bind protocol version with
LDAPConnection.getOption( LDAPv2.PROTOCOL_VERSION)
If we eliminate get/setOption, I guess we'll need to move that property to LDAPConstraints.
Rob