Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp Session, getting value from perl

Status
Not open for further replies.

SPrelewicz

Programmer
Jul 16, 2001
124
US
I have to use the university's authentication script (ASP) as part of my authentication process, but the rest of our site is in perl. I want to know how from a perl script, can I go out to the asp script, get a login true or false response, and continue in perl based on the response. Any ideas,

Thanks

Scott
 
LWP and PUT??

Haven't tried it, but could be worth a look

--Paul
 
Really, this depends on how the ASP script is coded. Can you provide any more details about it?

--Quentin
 
Sure, I'm glad to. First, let me preface by saying the complicated nature of out authentication system is not my idea and I wish it would be easier, but it's not my decision.

We have 2 basic types of users. Those affiliated with the university and those that aren't. Those that are have usernames & passwords from the university. Those that don't have them through us directly. So...

When a user logs in with their UN/PW, first I check it against our database for a match. If no success, I try to query the university via an ASP script they have given us. It is basically this:

<%

'---------------------------------------------------------
'-- check to see that the form was completely filled out--
'---------------------------------------------------------
if Request.querystring(&quot;username&quot;)=&quot;&quot; or Request.querystring(&quot;password&quot;)=&quot;&quot; then
response.redirect(## PROMPT USER
end if
principal=Request.querystring(&quot;username&quot;)
password=Request.querystring(&quot;password&quot;)


'--------------------------------------------------------
'-- Decide whether to let them in --
'--------------------------------------------------------
set oAuth=Server.createobject(&quot;#LOGIN OBJECT&quot;)
if oAuth.Auth(principal,password)=1 then
session(&quot;login&quot;)=true
session(&quot;principal&quot;)=principal
response.redirect (&quot;success&quot;)
else
session(&quot;login&quot;)=false
response.redirect (&quot;fail&quot;)
end if
set oAuth=nothing
%>

So, from our perl script I would like to call this asp somehow, find out if session(&quot;login&quot;)=true or false and contimue the perl app based on that. I realize I would be getting rid of the response.redirect lines, correct?

Thanks!

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top