Currently in C++ code, only the telemetry logger needs to fetch auth token. The telemetry logger will directly call ChromotingClientRuntime::Delegate::RequestAuthTokenForLogger() when it needs auth token, and it expects the the delegate to call logger->SetAuthToken() when the token is fetch.
When using TURN for relay, we will need to make an authenticated request to get back a list of relay servers. To make things simpler, we should refactor the existing auth token code into a centralized OAuthTokenGetter so that it can be used by both the logger and the transport. This could also help if we decide to unify the code to fetch host list in C++.
Comment 1 by huangml@chromium.org
, Nov 2 2017