locked_user sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:

I have before me a rather peculiar requirement that can’t be generalized.   My app is talking to a web-browser, that could be any type of browser, and the only thing that I know is that the aforesaid browser just-happens to be running in a (Windows...) environment that has OpenDirectory (LDAP...) authentication.   I would like to know if there is a way for a client-side app (e.g. through JavaScript?) to find out what OpenDirectory identity (if any...) the user who is talking to my (Perl based...) web-site professes to have.   (I do not require to trust that identity.)

Replies are listed 'Best First'.
Re: Is there a way to inquire about the OpenDirectory credentials of a client?
by Anonymous Monk on Apr 29, 2011 at 07:15 UTC

    You could try asking them. If you explained your legitimate reasons for wanting that information they'll still probably tell you to eff orf. But at least it'd be honest.

    Or you could try to con it out of them.

      Oh, no no, there is nothing at all illegitimate about this request; not at all.   I have an intranet of users who will be linking to this (Internet available) application, and I know that every one of them will have logged in under their own accounts, and it would be convenient for me to ascertain what that account is.

      Mind you, I do not have to “trust” what I am told, but it would save a couple steps if the app could be a little bit “clever” and “pro-active” and “just magically know” who this user appears to be.   But I can’t do it with any browser-specific assumptions or rely upon browser specific (“i.e. IE” ... ahem) fee-churs.

      And, if I can’t do it, then, well, “okay, I can’t do it.   Sux, but not the end of the world.”

Re: Is there a way to inquire about the OpenDirectory credentials of a client?
by Anonymous Monk on Apr 29, 2011 at 06:09 UTC
    as a rule, no, there is no way

    If you can get the browser to download and run an executable ... well