I am using HTTPService to do authentication and also to retrieve the data. Following is the part of the code..
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" height="661" autoLayout="false" marginTop="0" marginLeft="0" marginRight="0" marginBottom="0"> <mx:Script> <![CDATA[ //Call getuser, which calls webauth verify to check the current user function auth() { getuser.send({callap:mx.core.Application.application._url, logout: "http://xxx.xxx"}); } function auth_check() { //if the current user is not authenticated by webauth status will equal fail if (getuser.result.auth.status == "fail") { //you should now redirect the user to the login page getURL(getuser.result.auth.redirect, "_self"); } else{ getData(); } } function getData(){ var myID = getuser.result.auth.asurite; lookup.send({myid: myID, user: "xxx", passwd: "xxxxx"}); popCustomerForm_MyID(); } function popCustomerForm_MyID(customerData){ // Populate the fields in customerpanel customerinfostack.selectedChild = customerpanel; custfname.text = customerData.values.givenname; custlname.text = customerData.values.sn; custemail.text = customerData.values.mail; custphone.text = customerData.values.phonenumber; custdept.text = customerData.values.college; custcollege.text = customerData.values.department; contfname.text = customerData.values.givenname; contlname.text = customerData.values.sn; contemail.text = customerData.values.mail; contphone.text = customerData.values.phonenumber; } ]]> </mx:Script> <mx:HTTPService id="getuser" method="POST" url="http://flex.xx.xxx.xxx/lxxx/lxxxx.php" useProxy="false" result="auth_check()"/> <mx:HTTPService id="lookup" url="http://xxx.xx.xxx.xxx/lxxx/lxxxx.php" fault="faultHandler(event.fault.faultstring, event.fault.faultcode)" result="popCustomerForm(lookup.result)" method="POST" showBusyCursor="true" useProxy="false" /> <mx:ViewStack id="customerinfostack" visible="true" selectedIndex="0" width="884" height="559"> <mx:Panel width="865" title="Login Information" id="loginpanel" > <mx:Button label="login" click="auth()"/> </mx:Panel> <mx:Panel title="Customer information" id="customerpanel" width="714" height="581" verticalAlign="middle" horizontalAlign="center"> ---This panel has form that needs to be populated </mx:Panel> </mx:ViewStack > </mx:Application> On 7/21/05, Matt Chotin <[EMAIL PROTECTED]> wrote: > > > How are you doing the authentication? Are you using getURL to navigate the > browser? Or are you using an HTTPService to retrieve the data and using > basic authentication? I'm not sure how your app is set up here. > > > > Matt > > > ________________________________ > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of juyalmanu > Sent: Thursday, July 21, 2005 4:43 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] problem in using web authentication using different > website. > > > > > Dear All, > I am havig problem with web authentication service along with flex. > The idea is very simple. > > 1. I start a flex application (I am using viewstack), the first view > in the stach appear with two buttons, one for members and one for > guest. > > 2. if I am a member, I click a log in button and it takes me to a > URL where I will authenticate myself (It works fine). > > 3. Once I authenticate myself, I should be able to go to the next > view in the stack, where all my information will retrieved from the > database and all textboxes will be populated. > > (I am able to authenticate and able to retrieve the information but > it happens only if I set the call authentication function on > application's initialize function. In that case I don't need first > view in the stack (i.e. the view with two buttons). I'll > automatically go to the web authentication URL upon the start of the > application. ButI do need the first view). > > In my opinion what happening is that after completing the > authentication (after coming back from web authentication URL), the > application is again starting with first view. However I want it to > start with the second view with the populated text boxes. > > can anyone give me some idea please. > > --Manu > > > > > > > > > -- > Flexcoders Mailing List > FAQ: > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > ________________________________ > YAHOO! GROUPS LINKS > > Visit your group "flexcoders" on the web. > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > ________________________________ > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/