Topic: chumby and basic authentication

hi guys,

First post - dont have a chumby yet but been playing about with flash in preparation. 

I want to write a widget that fetches info from a web site protected via basic authentication - I was wondering -if you try to access a protected site via a chumby widget on the chumby itself what happens?  do you still see a password prompt on the chumby screen or does it simply not work unless you code the widget to to the login for you?

cheers all!

Re: chumby and basic authentication

I believe you will need a proxy to fetch the authenticated content then provide it to your chumby widget.

Which means you will need to host the proxy.

-John Forsythe
www.jforsythe.com

Re: chumby and basic authentication

jforsythe wrote:

I believe you will need a proxy to fetch the authenticated content then provide it to your chumby widget.

Which means you will need to host the proxy.

ah ok - hrm the reason I ask is that I have made a small widget that fetches a list of my current torrent downloads from my NAS box (which has a built in bT client).  I can actually get it to work by passing the login details as part of the HTTP request something like:

xmlthingy.loadandsend("http://name:password@192.123.123.123/blah", result);

at least in the FlashDevelop evironment!  I have no idea if this will work on an actual Chumby...  I only started doing actionscript yesterday so I might be being quite naive/optimisitic.

Interestingly the NAS box (a qnap ts-101) has a webserver built in that can deal with php so I guess I could call a PHP script from the widget that in turn fetches the data from the protected area.....maybe.

Anyway, I am in the UK and am awaiting my Chumby through a 3rd party, looking forward to it!

Gav

Re: chumby and basic authentication

if the data you are receiving is an RSS feed you can use feedburner to fetch the feed for you

for example give feedburner the url http://name:password@192.123.123.123/blah

feedburner will give you a new address accessible from Flash like feeds.feedburner.com/blah

of course anyone then read this feed that has access to new feedburner url

Re: chumby and basic authentication

Once you want to start loading data from a widget, you will find out about the security sandbox that Flash uses.  If you can run PHP on the place you are loading from, you can get around it relatively easily.  I posted the sample code here: http://www.vrtisworks.com/cmsms/index.p … ource-code

Nick

Re: chumby and basic authentication

vrtisworks wrote:

Once you want to start loading data from a widget, you will find out about the security sandbox that Flash uses.  If you can run PHP on the place you are loading from, you can get around it relatively easily.  I posted the sample code here: http://www.vrtisworks.com/cmsms/index.p … ource-code

Nick

hi,

yes thanks as it turns out I did exactly that - i.e. wrote a PHP script to do the actual work and this is in turn just accessed from the widget.  A nice side effect of this approach for my widget (just a download monitor) is that the php page can also be accessed using the google gadget API which I tinker with sometimes so I can use it in both a widget and a gadget to monitor my downloads :-) 

thanks for your replies all.  According the online tracker FedEx just delivered my Chumby today too! :-)