If you are using the new Flex 2 Coldfusion Adapter and CF7, use
remoteObjectID.setUsernamePassword(username, password) and in CF you'll see
them in the cflogin scope #cflogin.name# #cflogin.password#

Hope this helps
Ian


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Lesser
Sent: 14 November 2005 15:44
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: setUsernamePassword on RemoteObject

Picking up on an old thread from back in July, where calling addHeader on a
NetConnection object got authentication working with Coldfusion.... 
when I try to do the same thing in Flex 2 Alpha 1, I get:

code: NetConnection.Call.Failed and description: HTTP: Failed

Does anyone know if addHeader is still supposed to be available, if its a
bug, or if the parameters have changed?
 
Yours truly,
-Brian

Credentials sent in custom manner are never sent using HTTP Headers. The
information is contained within the AMF/HTTP POST body.

The Flex-only API, setUsernamePassword, works on a per request basis and
sends credential information inside a special Flex Envelope type which can
have per-request headers. The legacy Flash Remoting setCredentials API
worked on a per AMF packet basis (which potentially contained a batch of
several requests as per NetConnection) and was sent as an AMF Header. Either
way, you can only have one J2EE or CF session per connection, and
connections are pooled on endpoint URI in Flex. So it should be fine for you
to use the old setCredentials() API in most cases.

You could just call setCredentials() on the RemoteObject connection property
yourself... it simply sets an AMF Header on the underlying NetConnection
with an anonymous object that has two properties 'userid'
and 'password'.

        addHeader("Credentials", false, {userid: userId, password:
password});


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL <mailto:%5BEMAIL> PROTECTED]
On Behalf Of Andrew Spaulding
Sent: Tuesday, July 05, 2005 3:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: setUsernamePassword on RemoteObject

Thanks Vinny,

Im assuming theres no workaround for this? Im probably just gonna pass the
username and password as variables with each call then. Im using the
cairngorm framework and I have a delegate super class so I can hide it all
in there ;)

cheers,

Andrew Spaulding
www.flexdaddy.info



--- In flexcoders@yahoogroups.com, Vinny Timmermans <[EMAIL PROTECTED]>
wrote:
> This is a known bug in Flex 1.5. The setUsernamePassword API is not 
> connected to CFLOGIN. Hope they will fix it in Flex 2.
> 
> Vinny
> 
> -----Original Message-----
> From: flexcoders@yahoogroups.com [mailto:[EMAIL <mailto:%5BEMAIL> 
> PROTECTED]
On
> Behalf Of Andrew Spaulding
> Sent: dinsdag 5 juli 2005 04:38
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] setUsernamePassword on RemoteObject
> 
> Hi,
> 
> I'm trying to use the flash remoting setCredentials equivalent in
flex to
> send a username and password with my remote object requests. 
> 
> I can see the Credentials being set in the header when i view the
traffic in
> the netConnectionDebugger, but nothing seems to be in the http
header, and
> hence is not picked up in <cflogin>
> 
> Any ideas?
> 
> Andrew Spaulding
> www.flexdaddy.info
> 
______________________________________________________________________
Brian Lesser
Assistant Director, Teaching and Technology Support Computing and
Communications Services Ryerson University 350 Victoria St.
Toronto, Ontario                   Phone: (416) 979-5000 ext. 6835
M5B 2K3                            Fax: (416) 979-5220
Office: AB48D                      E-mail: [EMAIL PROTECTED]
(Enter through LB66)               Web: http://www.ryerson.ca/~blesser
______________________________________________________________________



------------------------ Yahoo! Groups Sponsor --------------------~--> Get
Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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



 







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/
 


Reply via email to