Perl - Domino Session Information

Greetings All!

I was wondering if it were possible to obtain current HTTP session information (namely a person’s username) using CGI scripts such as perl? I feel I have exhausted my search efforts thus far with Google, and am now turning to this Community to seek your wisdom in hopes I will be provided an example or otherwise pointed me in some direction where I can once again make progress in my tasks.

Many thanks in advance!

-OA

Subject: Perl - Domino Session Information

Do you mean like this (from the Designer Help):

This script uses the Print statement and the CGI variable remote_user to display “User =” and the Web user’s name. The script sets the DocumentContext before executing the rest of the script. The variable assumes a text list.

Dim session As New NotesSession

Dim doc As NotesDocument

Set doc = session.DocumentContext

Print "User = " + doc.remote_user(0)

Subject: RE: Perl - Domino Session Information

Hi Marco, thanks for your reply.

Pulling the username and other “CGI variables” from LotusScript is a snap since you can create and directly access a session object in the context of a logged-in user’s session to extract property values such as username, user agent ect… My problem here is I am trying to extract, at minimum, the username of the logged in http user using a perl script – not lotusscript.

My internet site document has a file protection rule configured for the “/cgi-bin” CGI URL Path (eg, http://dominoservername/cgi-bin/*) to not allow anonymous users, and will redirect all users who requests any script(s) located in this directory to a login page. After they login, they will be able to access scripts contained in the directory. These scripts should be able to determine who is logged in, in order to determine their processing routines.

These perl scripts are currently hosted on an Apache server which is being decomissioned, and because of their function, it makes much more sense to host them directly on this domino server as opposed to moving them to another Apache box. Getting a user’s login name on the Apache box is done similar to

this:

my $r = Apache->request;

print $r->connection->user;

But, obviously, this isnt Apache, and there isnt an “Apache.request” object to work with. Is there any sort of interface that can be leveraged to acquire this information?