Copy link to clipboard
Copied
I have a stagewebview that displays a page in my Air for Android app. I am aware that authentication dialog ui wont show up when running the apk on a device (i's not supported atm) so does anyone know a workaround for this? can i set the username and password using URLRequestDefaults.setLoginCredentialsForHost? I have tried doing this before loading the page in the stageview but it doesn't seem to work.
Copy link to clipboard
Copied
I have also tried to do the authentication in the header like this :
var encodedUsrPassword:String = Base64.encode( loginID + ":" + loginPasswd);
var urlStream0:URLStream = new URLStream();
var urlRequest_HTTPBasic:URLRequest = new URLRequest(url);
urlRequest_HTTPBasic.authenticate = false;
var urlRequestHeader1:URLRequestHeader = new URLRequestHeader("Authorization", "Basic " + encodedUsrPassword );
urlRequest_HTTPBasic.requestHeaders.push(urlRequestHeader1);
urlStream0.load(urlRequest_HTTPBasic);
webView.loadURL(urlRequestHeader1);
But i get the error :
error loading page: The protocol is not supported.