generic support library for signed-token-based auth schemes