async getToken()

in src/common-http/rest_api_client.ts [174:182]


   async getToken(): Promise<string> {
    if ((!this._accessToken) || this.isAccessTokenCloseToExpiry(this._accessToken)) {
      this._accessToken = await this._config.tokenCredential.getToken(this._config.tokenScope) as any;
    }
    if (!this._accessToken) {
      throw new Error('AccessToken creation failed');
    }
    return this._BearerTokenPrefix + this._accessToken.token;
  }