Jump to content
Search Community

Loading resources protected by Basic Authentication

Jason Green test
Moderator Tag

Recommended Posts

Hey there, love all your work, and would love to use LoaderMax for an Adobe Air project that I am doing. I will basically be loading resources from the web and saving them locally. The only problem is that the resources are protected by Basic Authentication. I think something like this can be used in general to load from a protected url:

 

URLRequestDefaults.setLoginCredentialsForHost(hostname, user, password);

URLRequestDefaults.authenticate = true;

 

But I wanted to know if this is something I can do with LoaderMax, or if it is not native behaviour, if it would be difficult for an intermediate (maybe advanced, but not expert) user to modify LoaderMax to do it?

 

Any indications you could give me would be REALLY appreciated.

 

Thanks, Jason.

Link to comment
Share on other sites

I'm not an AIR guy, but those methods look like static methods that might affect all loaders in which case it'd work with LoaderMax (in theory). I doubt it'd be massively difficult for you to edit the source if you need to. I'd love to hear how things come along for you.

Link to comment
Share on other sites

Yeah I just noticed that I can pass loadermax a UrlRequest object instead of a string. Given that I can attach headers to the UrlRequest I think it should be ok. I will let you know once I try it.

 

I have already successfully tested a UrlRequest on it's own, I imagine it will work.

 

Thanks for the quick reply. I'm glad I convinced my company to buy your transform class, worth every penny :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...