make the token fetching mechanism configurable