1. Michael Richardson
  2. tender-multipass

Overview

tender-multipass

Tender is a hosted support and knowledge base application developed by ENTP. To prevent users from needing to create multiple accounts, one on an application site and one on the hosted support site, Tender uses a home-grown system called MultiPass. This passes user information via GET arguments that contain AES-encrypted JSON data. Since getting this right is a real hassle in Python, we're providing this, which should make it easier.

Usage

Instantiate a MultiPass object with a site_key and api_key. These are found at http://your_tender_site.com/settings - first enable Single Sign On, then you can get the API key and the site key from the fields provided.

>>> import datetime
>>> import tender_multipass
>>> multipass = tender_multipass.MultiPass("some_site", "some_key")
>>> expires = datetime.datetime.now() + datetime.timedelta(days=14)
>>> data = {"name": "Michael", "email": "michael@mtrichardson.com", "expires": expires.strftime("%Y-%m-%dT%H:%M")}
>>> multipass.encode(data)
'4rdsKqcXzJVqbltYJdayy6lIkwtl7vAivlgyDkWCfORWze5HrvfuarBh8Yvkush8cOywmDG4y4M9%0A6vuIyAIWskXOpUaCT/%2BzQ%2BJU8Jf0u0X7%2BbTwjdWyzub6srayFyKn%0A'

Then, you would redirect that user to http://your_tender_site.com/?sso=the_string_from_encode, or provide them with that link.

Requirements

tender-multipass requires the M2Crypto library, found at http://chandlerproject.org/Projects/MeTooCrypto .

Notes

The authors are in no way affiliated with ENTP, we just like their stuff.