-
Sep 26th, 2006, 02:32 AM
#1
Retrieve OctetString attribute with DirContextAdapter causes class cast exception
Hi,
When using Sun Directory Server, retrieving an OctetString (such as a hashed password) attribute using DirContextAdapter.getStringAttribute() causes a class cast exception. This is because OctetString are in fact returned as byte[].
I worked around this by extending DirContextAdapter and adding a [ExtendedDirContextAdapter].getOctetStringAttribute() method. . . . at least this is what I'm about to do
Perhaps this is a bit sucky.
Maybe DirContextAdapter could support different attribute types (GeneralizedTime, DirectoryString, OctetString, etc) ?
Thanks,
Jasper
-
Sep 26th, 2006, 02:38 AM
#2
Oops: Found getObjectAttribute.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules