Configurable ways of handling invalid token