2 Replies Latest reply on May 4, 2010 7:52 PM by orzFlex

    How to pass Basic Authorization without poped dialog

    orzFlex

      The following is the actionscript and crossdomain.xml

       

                      public function init():void{
                            var service:HTTPService=new HTTPService();
                            service.url="http://127.0.0.1:8080/manager/test/tomcat-users.xml";
                            service.method="POST";
                           service.headers["Authorization"]="Basic "+getAuthorization();
                            service.addEventListener(ResultEvent.RESULT,handler);
                            service.addEventListener(FaultEvent.FAULT,handler);
                            service.send();
                        }
                        
                        public function handler(e:Event):void{
                            trace(e);
                        }
                       
                        public function getAuthorization():String{
                            var encoder:Base64Encoder=new Base64Encoder();
                            encoder.encode("admin:12345");
                           
                            return encoder.toString();
                        }

       


      <cross-domain-policy>
      <site-control permitted-cross-domain-policies="master-only"/>
      <allow-access-from domain="*" secure="false"/>
      <allow-access-from domain="*" to-ports="*"/>
      <allow-http-request-headers-from domain="*" headers="*"/>
      </cross-domain-policy>

       

      why is there still a dialog poped up for authorization.Anything else need to be done?