def verify_remote(assertion, audience=None): """Verify the given VEP assertion by posting to the remote verifier. This is a convenience wrapper that uses the RemoteVerifier class in its default configuration. If you have more particular needs, create your own instance of RemoteVerifier and use its verify() methd. """ global _DEFAULT_REMOTE_VERIFIER if _DEFAULT_REMOTE_VERIFIER is None: _DEFAULT_REMOTE_VERIFIER = RemoteVerifier() return _DEFAULT_REMOTE_VERIFIER.verify(assertion, audience)
def verify(assertion, audience=None): """Verify the given VEP assertion. This function uses the "best" verification method available in order to verify the given VEP assertion and return a dict of user data. The best method currently involves POSTing to the hosted verifier service on browserid.org; eventually it will do local verification. """ global _DEFAULT_REMOTE_VERIFIER if _DEFAULT_REMOTE_VERIFIER is None: _DEFAULT_REMOTE_VERIFIER = RemoteVerifier() return _DEFAULT_REMOTE_VERIFIER.verify(assertion, audience)