madjar/pyramid_persona — pull request #3 by rfk (2012-10-02 23:44:01+00:00)
Title: Use a pre-built verifier object for lower per-request overhead

Great work on this @madjar.

One improvement I would suggest is using an explicit, pre-built browserid.Verifier object to do the verification. This will pre-compile some regular expressions used for audience checking, meaning that the overhead per request will be slightly lower. It would also make it easier for any user who want to plug in a different implementation of the verifier, e.g. to do local verification.

(This PR also includes some tweaks to the way config loading interacts with the tests, the existing setup did not seem to work properly for me)