Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Automatically logging in to a foreign web site

$
0
0
Automatically logging in to a foreign web site
Web Connection 5.0
Automatically logging in to a foreign web site
12/30/2011
09:29:48 AM
3E90KC0DC Show this entire thread in new window
From:
To:
All
Attachments:
None
Hi,

I have a Web Connection web site and I want a logged-in user to be able to click on a link and have their user information sent to another web site (not a web connection web site) and that foreign web site will then read the URL and the encrypted username/password that I intend to send to them (they'll obviously know how to decrypt the info I send them).

For testing purposes, I've created a sample web page that is called from a simple method that I thought would do the deed, but I keep getting something on the order of:
Can't find or open page c:\inetpub\wwwroot\taw\TABO_yllogin.html?l1=p1&l2=p2

*************************************************************************
FUNCTION TABO_YlLogin()
*************************************************************************
LPARAMETERS paFirms, pcCaseID
LOCAL loSR, lcReturnType, lcUserName, lcPassword, p1, p2

lcReturnType = "HTML"
*
* Loads currently logged-in web user into .oCurrentUser property
*
This.LoadCurrentUser()
*
* Creates corresponding object for the type of web user (there can be three types)
*
loSR = CREATEOBJECT('asr', .F.,lcReturnType,this.oCurrentUser)
*
* Based on the web user, the more complete user information is loaded from the loSR object
*
loSR.Load(this.oCurrentUser.oData.in_typeid)

lcUserName = ALLTRIM(loSR.oData.email)
lcPassword = ALLTRIM(This.oCurrentUser.oData.in_passwor)

p1 = This.x3ed([D],lcUserName)
p2 = This.x3ed([D],lcPassword)

IF FILE(gowcserver.oconfig.oTAWPROCESS.cHTMLPagePath + 'TABO_yllogin.html')
*
* The below line doesn't work - getting response indicated previously
*
Response.ExpandTemplate(gowcserver.oconfig.oTAWPROCESS.cHTMLPagePath + 'TABO_yllogin.html?l1=p1&l2=p2',"FORCE RELOAD")
*
* The below line works, but of course it's not passing the parameters I need to pass
*
* Response.ExpandTemplate(gowcserver.oconfig.oTAWPROCESS.cHTMLPagePath + 'TABO_yllogin.html',"FORCE RELOAD")
*
* Next one doesn't work either
*
* Response.redirect(gowcserver.oconfig.oTAWPROCESS.cHTMLPagePath + 'TABO_yllogin.html?l1=p1&l2=p2')
ENDIF

RELEASE loSR
RETURN

ENDFUNC && TABO_YlLogin()

I must be missing something very simple ...

Kevin




Viewing all articles
Browse latest Browse all 10393

Trending Articles