Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Accessing LDAP jpegPhoto attribute in Ruby...

Reply
Thread Tools

Accessing LDAP jpegPhoto attribute in Ruby...

 
 
augustf@gmail.com
Guest
Posts: n/a
 
      09-22-2006
Hi everyone,
In writing my Ruby LDAP application, I'm able (with activeldap) to
access any ldap attribute I need - except binary ones. user.uid, for
instance would get me the userid of the user. But user.jpegPhoto yields
binary rubbish.

The excellent documentation for active ldap
(http://ruby-activeldap.rubyforge.org/doc/) showed how to access a
userCertificate like so: user.userCertificate = {'binary' =>
File.read('example.der')} . I'm unable to replicate something
comparable for jpegPhoto. Anyone know how I can display the jpegPhoto
attribute properly?

 
Reply With Quote
 
 
 
 
Francis Cianfrocca
Guest
Posts: n/a
 
      09-22-2006
On 9/22/06, http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:
> Hi everyone,
> In writing my Ruby LDAP application, I'm able (with activeldap) to
> access any ldap attribute I need - except binary ones. user.uid, for
> instance would get me the userid of the user. But user.jpegPhoto yields
> binary rubbish.
>


Have you tried querying this attribute with the Net::LDAP library? It
recently acquired some significant improvements in how it handles
binary attributes. I can tell you from my own research that some
versions of the native-code LDAP libraries (which Ruby/LDAP and
ActiveLDAP are based on) have some possibly incorrect behavior with
regard to binary values.

 
Reply With Quote
 
 
 
 
augustf@gmail.com
Guest
Posts: n/a
 
      09-22-2006
Sorry to impose further, but I'm a relative newbie to Ruby - what would
be the general sort of syntax needed in this situation?


Francis Cianfrocca wrote:
> On 9/22/06, (E-Mail Removed) <(E-Mail Removed)> wrote:
> > Hi everyone,
> > In writing my Ruby LDAP application, I'm able (with activeldap) to
> > access any ldap attribute I need - except binary ones. user.uid, for
> > instance would get me the userid of the user. But user.jpegPhoto yields
> > binary rubbish.
> >

>
> Have you tried querying this attribute with the Net::LDAP library? It
> recently acquired some significant improvements in how it handles
> binary attributes. I can tell you from my own research that some
> versions of the native-code LDAP libraries (which Ruby/LDAP and
> ActiveLDAP are based on) have some possibly incorrect behavior with
> regard to binary values.


 
Reply With Quote
 
Francis Cianfrocca
Guest
Posts: n/a
 
      09-22-2006
On 9/22/06, (E-Mail Removed) <(E-Mail Removed)> wrote:
> Sorry to impose further, but I'm a relative newbie to Ruby - what would
> be the general sort of syntax needed in this situation?
>


I'll contact you privately. Then if this succeeds we'll post the
results to the list.

 
Reply With Quote
 
augustf@gmail.com
Guest
Posts: n/a
 
      10-10-2006
Since my last post, I've made some significant progress on this
problem, but am still stuck with some non-workable code. Have a look:
http://p.caboo.se/16721 Thanks everyone!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
python-ldap/win32 or python/ldap/win32 rcmn Python 1 11-06-2006 11:47 PM
Need to wrtie LDAP class to *answer* LDAP queries. junk1@davidbevan.co.uk Java 1 02-21-2006 09:59 PM
ruby-ldap: uninitialized constant LDAP::LDAP_CONTROL_PAGEDRESULTS James Hughes Ruby 4 12-13-2005 11:46 PM
[ANN] Ruby/LDAP 0.9.1: LDAP API (RFC1823) library. Ian Macdonald Ruby 0 03-15-2005 11:23 PM
using LDAP Controls in ruby-ldap Jason Wold Ruby 5 11-07-2004 03:35 AM



Advertisments