DuongVT7
DuongVT7

Reputation: 11

Problem with authentication from actionscript to siteminder SSO

I am migrating an adobe flex application from web version (running in flash player) to adobe air desktop application. My application communicate with a "blazeDS service" via remote object (a way pair adobe flex with java backend) at URL: http://myhost.example.com/mycontext/messagebroker/amf The above URL is protected with CA site minder, if user has not logged in, the system redirect to siteminder log in page at: http://myhost.example.com/sso/*...

I tried send post request to siteMinder service via post man to login success.(Post user name, password, pin, etc..) Then siteminder responsed with the cookies.

My task is try to send http request via action script to login from my air application.

I wrote a simple air application send request when initialize as bellow:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">
    <mx:Script>
        <![CDATA[
            import mx.controls.Alert;
            import flash.net.*;
            function init(){
                var req : URLRequest= new URLRequest("http://myhost.example.com/sso/");//The Siteminder service URL.

                var formData : URLVariables = new URLVariables("email=test&uname=1002102571&pass=test&gender=male"); //Post data
                req.data = formData;
                req.contentType = "application/x-www-form-urlencoded";
                req.method = "POST";
                var urlLoader : URLLoader = new URLLoader(req);
                urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onResponse);
                urlLoader.addEventListener(Event.COMPLETE, onComplete);
                urlLoader.load(req);
            }
            function onResponse(event){
                Alert.show("aaa" + event.target);
            }
            function onComplete(event){
                Alert.show("bbb");
            }
            function response(event){
                Alert.show("â0");
            }
            function fault(event){
                Alert.show("nb");
            }
        ]]>
    </mx:Script>
</mx:WindowedApplication>

Then siteminder response cookies too.

But when I intergrate my code to the real system, site minder respond log in fail. I don't know what is differrent between two application. Please share your advice.

Upvotes: 1

Views: 96

Answers (0)

Related Questions