give refreshauth.py a hook and call that in hgadmin hgrc
# hgrc to use for all remote users[hooks]pretxnchangegroup.access = python:mercurialserver.access.hookchangegroup.aaaaa_servelog = python:mercurialserver.servelog.hookoutgoing.aaaaa_servelog = python:mercurialserver.servelog.hook