2. shibboleth – urllib shibboleth authentication

2.1. Shibboleth Objects

Using the shibboleth handler is a bit different to the urllib2 handlers because the shibboleth auth chain is far more complex.

from sibboleth import Shibboleth, SimpleCredentialManager, Idp
idp = Idp('VPAC')
c = SimpleCredentialManager('testuser', 'testpass')
shibboleth = Shibboleth(idp, c)
response = shibboleth.openurl('https://slcs1.arcs.org.au/SLCS/login')
for line in response:
    print line

To manually specify proxies, use

proxies = {'http': 'http://user1:pass@localhost:3128/'}
shibboleth = Shibboleth(idp, c, proxies=proxies)

2.2. ShibbolethHandler Objects

2.3. ShibbolethAuthHandler Objects

2.4. set_cookies_expires() Function