AMF client - cookies

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AMF client - cookies

nuno.freitas@alert-online.com
This post has NOT been accepted by the mailing list yet.
Hi,

I’m a QC eng. and I’m trying to do some automation in our application. Flash based -> Java -> DB

I’m trying to do tests by calling our services, like flash does (AMF requests), but for that I must pass our authentication service first… it’s based in some redirects to get some cookies and then call a public method to authenticate that session, and setting up some more cookies.

So, I’ve done the first part with python’s module: mechanize

I collected the cookies, and set the cookies before calling the service:

(…)
gw_sso    = RemotingService('http://pfhqc262sso.mni.local/gateway')
gw_sso.addHTTPHeader("Cookie",  cookies)
service = gw_sso.getService('com.alert.security.idp.authsso.AuthenticatorSSOExtra')
response = service.validateCredentials('xxxxxxxxxxxxx',5,'PASSWORD')

My problem is that, this service call should set up another cookie… the response is success… but I cannot see the cookie value…
Should it be stored also in: gw_sso.http_headers ?

I’ve checked there… but no new cookie was there…

Could You please Help me on this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AMF client - cookies

nuno.freitas@alert-online.com
This post has NOT been accepted by the mailing list yet.
servic = gw_sso.getService('com.alert.security.idp.authsso.AuthenticatorSSOExtra', auto_execute=False)
wrapper = servic.validateCredentials('xxxxxxx',5,'PASSWORD')
response = gw_sso.execute_single(wrapper)


print '01 --------->' , response.envelope
print '02 --------->' , response.body
print '03 --------->' , response.headers
print '04 --------->' , gw_sso.headers
print '05 --------->' , gw_sso.http_headers





no cookies are found in either field... but the service is executed fine.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AMF client - cookies

nuno.freitas@alert-online.com
This post has NOT been accepted by the mailing list yet.
Problem fixed by adding this to the _getResponse method on RemotingService Class


        setcookie = http_message.getheader('Set-Cookie')
        self.http_headers['Set-Cookie'] = setcookie


maybe interesting to add a more final solution to the project?

Loading...