Is HTTP Auth possible?

16 views
Skip to first unread message

Cam

unread,
Mar 1, 2008, 4:26:57 PM3/1/08
to AS3 HttpClient
Hi, after reading that Flash Player 9.0.115 had disabled support for
the 'Authorization' HTTP header for security reasons (seems a bizarre
decision) I found your library and was wondering if it's decision to
sidestep URLRequest and URLLoader might result in it making performing
Basic HTTP Authorization possible in Flash again.

I was trying with the following code,

var uri:URI = new URI('https://api.del.icio.us/v1/tags/get');
var client:HttpClient = new HttpClient();
var request:HttpRequest = new Get();
request.addHeader("Authorization", "Basic a_base_64_encoded_string");
client.request(uri, request);

but unfortunately am receiving an error,

[trace] Connecting: host: api.del.icio.us, port: 443
[trace] Sending request: GET /v1/tags/get HTTP/1.1
[trace] Host: api.del.icio.us
[trace] Connection: close
[trace] Authorization: Basic a_base_64_encoded_string
[trace]
[trace] --
[trace] Send request done
[trace] Error: Error #2030: End of file was encountered.
[trace] at flash.utils::ByteArray/readShort()
[trace] at com.hurlant.crypto.tls::TLSEngine/parseHandshakeHello()
[trace] at com.hurlant.crypto.tls::TLSEngine/parseHandshake()
[trace] at com.hurlant.crypto.tls::TLSEngine/parseOneRecord()
[trace] at com.hurlant.crypto.tls::TLSEngine/parseRecord()
[trace] at com.hurlant.crypto.tls::TLSEngine/dataAvailable()


Unsure how to progress from here, nothing I'm trying seems to work!

P.S. Just in case you're unaware, the library as it currently stands
doesn't work in non-AIR projects without a few tweaks as it's
importing and using the AIR-only flash.filesystem classes.

gabe

unread,
Mar 1, 2008, 5:41:00 PM3/1/08
to AS3 HttpClient
This error is being thrown by as3crypto. I debugged a little and it
looks like as3crypto doesn't support the TLS client key exchange (on
RSA is supported) for https://api.del.icio.us.

Maybe if I have some free time (probably never), I can look at
patching, but TLS is really gnarly. You can also try emailing the
creator of as3crypto (http://metal.hurlant.com/blog/)

Also I never got around to fully separating the AIR specific stuff. I
ran into a problem where I can't dynamically load classes at runtime
depending on whether I am in AIR or Flash. I'll need some build script
to do the heavy lifting.

--gabe

Cam

unread,
Mar 2, 2008, 5:49:22 AM3/2/08
to AS3 HttpClient
It's just for a small personal project so don't worry about patching.

I've left a comment on the as3crypto blog, so will see if anyone has
any ideas.

Thanks for the help


On Mar 1, 10:41 pm, gabe <gabri...@gmail.com> wrote:
> This error is being thrown by as3crypto. I debugged a little and it
> looks like as3crypto doesn't support the TLS client key exchange (on
> RSA is supported) forhttps://api.del.icio.us.
Reply all
Reply to author
Forward
0 new messages