mozilla-services/tokenserver — pull request #11 by rfk (2012-07-17 07:31:00+00:00)
Title: Update pyworker for PyBrowserID 0.7 API changes.

I'm keen to release PyBrowserID 0.7 with its support for not-having-to-install-M2Crypto, so I've had a bit of a stab at updating tokenserver for the changed APIs. It's probably not ready for merge yet, but hopefully it's a start.

The two relevant changes are:

* CertificatesManager is now SupportDocumentManager and it caches the whole browserid support document, not just the json for the public key
* jwt.Key objects now provide a method for loading from PEM data

PyBID 0.7 also adds another point at which the verifier may need to look up remote data, the call to is_trusted_issuer here: https://github.com/mozilla/PyBrowserID/blob/master/browserid/verifiers/local.py#L81.

Because of this, it may make sense to share the supportdocument cache between the verifier object (which needs it for resolving delegated authorities) and the workers (which need it for public keys).