View Full Version : Accessing data xml that requires a sign-in?
whisperstorm
04-09-2004, 09:46 AM
I want to create something that uses the del.icio.us api. It appears that they use simple authentication to get to your "profile" 's xml files.. for example:
http://del.icio.us/api/posts/recent
How can I get Laszlo to "sign in" for me and allow me to access the xml page that is returned?
antun
04-09-2004, 09:49 AM
Have you tried setting the source of the dataset to:
http://username:password@del.icio.us/api/posts/recent
That sometimes works.
-Antun
whisperstorm
04-09-2004, 01:00 PM
looks like that's not working... how does Laszlo do http-auth?
Here's the api page for del.icio.us
http://del.icio.us/doc/api
antun
04-09-2004, 01:12 PM
I had forgotten about this - someone asked for it a while back and I had filed a feature request. I've updated the request to indicate that more people are asking for this feature.
-Antun
whisperstorm
08-12-2004, 02:15 PM
Hi there, was checking about the status of this? Any way to do simple auth with laszlo?
dybomaha
08-15-2004, 05:43 PM
With the latest Internet Explorer, this kind of login was disabled.
http://username:password@del.icio.us/api/posts/recent
If you do this with IE, it will fail with a syntax error. If Flash uses IE, I think it will fail as well.
DYBOMAHA
antun
08-16-2004, 08:55 AM
Thanks for the info - I'm not sure if the Flash Player goes through IE or not, but I have made a note of this.
Take care,
Antun
You could use the dataset.setHeader() method to set the required header manually. You would need to set the "Authorization" header, with a base64 encoding of the username and password. You could generate that yourself.
I believe these headers are forwarded on through the LPS server to the back-end host you are fetching the data from (need to verify this...)
dybomaha
08-22-2004, 03:57 PM
The basic authentication headers and cookie headers are both simliar, but they are not the same thing when the server processes the client request. They are distinct HTTP headers and are processed in different ways. The cookie header is sent as "Cookie: name1=value1&name2=value2"
The auth header is sent as "Basic: encoded auth"
When the server looks for the local username it can be retreived from the local environment in this way, so the server side parameter storing authentication is distinctly different than the one storing the cookie.
The method to send http://userid:password@www.somehost.com/ was removed from IE 6 by a security patch. If the Flash plugin uses the IE container as the browser option, this will not work inside Laszlo, either. Some testing seems to indicate that this is the case.
The testing was done with JSESSIONID - I have to push the value to the browser to maintain the session. This indicates to me that cookies and probably the authentication parameters are stored in the browser. This would further imply that setting the headers in the way described would work, if you were to set the "Basic:" header with the correct encoded login.
DYBOMAHA
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.