prologin.tornadauth module

Utilities for authentication in Tornado servers.

prologin.tornadauth.signature_checked(secret_name, check_msg=False)

Return a decorator for Tornado requests handlers’ methods.

The decorator wraps a given method handler so that the signature of requests are checked before calling the handler itself. If checking fails, log the failure and return a HTTP 403 error. The shared secret used for checking is the secret_name attribute of the Tornado application associated to the handler. Include message checking if asked to.