Python interface OpenSSO/OpenAM. Implements all of the end-user authentication functionality. Admin functions coming soon...
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.


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

Code borrowed and reworked from django-opensso by nsb

The 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"

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


>>> import opensso
>>> o = opensso.OpenSSO('')
>>> token = o.authenticate('jathanism', 'password')
>>> o.is_token_valid(token)
>>> 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)

More details Soon(TM).