source: TI12-security/trunk/NDGSecurity/python/Tests/m2Crypto/unicode.py @ 6440

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/trunk/NDGSecurity/python/Tests/m2Crypto/unicode.py@6440
Revision 6440, 1.5 KB checked in by pjkersha, 11 years ago (diff)
  • #1088 Important fix to AuthnRedirectResponseMiddleware? to set redirect ONLY when SSL client authentication has just succeeded in the upstream middleware AuthKitSSLAuthnMiddleware. This bug was causing the browser to redirect to the wrong place following OpenID sign in in the case where the user is already logged into their provider and selects a new relying party to sign into.
    • Improvements to Provider decide page interface: leave out messages about attributes that the provider can't retrieve for the RP. Also included NDG style help icon.
Line 
1#!/use/bin/env python
2#from M2Crypto.httpslib import HTTPSConnection
3from ndg.security.common.utils.m2crypto import HTTPSConnection
4
5#hostname = u'ndgbeta.badc.rl.ac.uk'
6hostname = u'gabriel.badc.rl.ac.uk'
7path = u'/SessionManager'
8#
9#body = '''<SOAP-ENV:Envelope
10#xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
11#xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
12#xmlns:ns1="urn:ndg.security.sessionMgr">
13#<SOAP-ENV:Header></SOAP-ENV:Header>
14#<SOAP-ENV:Body><ns1:getAttCert/></SOAP-ENV:Body>'''
15
16#con = HTTPSConnection(hostname)
17#con.putrequest('POST', path)
18#con.putheader('Content-Type', 'text/xml')
19#con.putheader('Content-Length', str(len(body)))
20#con.endheaders()
21#con.send(body)
22#resp = con.getresponse()
23#print resp.read()
24
25con = HTTPSConnection(hostname)
26con.putrequest('GET', path)
27con.endheaders()
28resp = con.getresponse()
29print resp.read()
30
31#from httplib import HTTPConnection
32#
33#hostname = 'gabriel.badc.rl.ac.uk'
34#port = 5000
35#path = u'/AttributeAuthority'
36#
37#body = '''<SOAP-ENV:Envelope
38#xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
39#xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
40#xmlns:ns1="urn:ndg.security.attAuthority">
41#<SOAP-ENV:Header></SOAP-ENV:Header>
42#<SOAP-ENV:Body><ns1:getX509Cert/></SOAP-ENV:Body>'''
43#
44#con = HTTPConnection(hostname, port=5000)
45#con.putrequest('POST', path)
46#con.putheader('Content-Type', 'text/xml')
47#con.putheader('Content-Length', str(len(body)))
48#con.endheaders()
49#con.send(body)
50#resp = con.getresponse()
51#print resp.read()
52
53
54
Note: See TracBrowser for help on using the repository browser.