exposing bearer token generation so that it can be included in other request types as well