Python interface OpenSSO/OpenAM. Implements all of the end-user authentication functionality. Admin functions coming soon...
Python
Latest commit 0e50e0c Nov 16, 2011 1 @jathanism Fixed the way tokens are parsed and will now be stripped prior to
evaluation, vs. evaluated literally.

README

python-opensso - Python interface to OpenSSO/OpenAM REST API

Code borrowed and reworked from django-opensso by nsb 
https://github.com/nsb/django-opensso

The opensso.py module provided by django-opensso had a dependency upon 
python-restclient which in turn had a dependency upon python-httplib2. I removed 
these dependencies in favor of Python's urllib2, which is part of the Standard 
Library.  Since we're just doing basic HTTP GET calls, I felt that eliminating 
the external dependencies made this library as lightweight as possible.

For REST API documentation please see "The OpenSSO REST Interface in Black/White"
http://blogs.sun.com/docteger/entry/opensso_and_rest

This is not a complete implementation. Only the end-user functionality has
been included.  None of the administrative methods are implemented... yet.

Example:

>>> import opensso
>>> o = opensso.OpenSSO('https://example.com/opensso')
>>> token = o.authenticate('jathanism', 'password')
>>> o.is_token_valid(token)
True
>>> attrs = o.attributes(token)
>>> attrs.attributes.keys() 
['telephonenumber', 'distinguishedname', 'inetUserStatus', 'displayname', 'cn', 
'dn', 'samaccountname', 'useraccountcontrol', 'objectguid', 'userprincipalname', 
'name', 'objectclass', 'sun-fm-saml2-nameid-info', 'sn', 'mail', 
'sun-fm-saml2-nameid-infokey', 'givenname', 'employeenumber']
>>> attrs.attributes['displayname']
'McCollum, Jathan'
>>> o.logout(token)
>>> o.is_token_valid(token)
False

More details Soon(TM).