async AuthorizationToken({
    libraryId,
    objectId,
    versionHash,
    partHash,
    encryption,
    audienceData,
    update=false,
    channelAuth=false,
    noCache=false,
    noAuth=false
  }) {
    const initialNoCache = this.noCache;

    try {
      // noCache enabled for this call
      if(noCache && !this.noCache) {
        this.noCache = true;
      }

      let authorizationToken;
      if(channelAuth) {
        authorizationToken = await this.GenerateChannelContentToken({objectId, audienceData});
      } else {
        authorizationToken = await this.GenerateAuthorizationToken({
          libraryId,
          objectId,
          versionHash,
          partHash,
          encryption,
          update,
          noAuth
        });
      }

      return authorizationToken;
    } catch(error) {
      throw error;
    } finally {
      this.noCache = initialNoCache;
    }
  }
// Wrapper for GenerateAuthorizationHeader to allow for per-call disabling of cache
Wrapper for GenerateAuthorizationHeader to allow for per-call disabling of cache
Wrapper for GenerateAuthorizationHeader to allow for per - call disabling of cache
async AuthorizationToken({
    libraryId,
    objectId,
    versionHash,
    partHash,
    encryption,
    audienceData,
    update=false,
    channelAuth=false,
    noCache=false,
    noAuth=false
  }) {
    const initialNoCache = this.noCache;
    try {
      if(noCache && !this.noCache) {
        this.noCache = true;
      }
      let authorizationToken;
      if(channelAuth) {
        authorizationToken = await this.GenerateChannelContentToken({objectId, audienceData});
      } else {
        authorizationToken = await this.GenerateAuthorizationToken({
          libraryId,
          objectId,
          versionHash,
          partHash,
          encryption,
          update,
          noAuth
        });
      }
      return authorizationToken;
    } catch(error) {
      throw error;
    } finally {
      this.noCache = initialNoCache;
    }
  }
async AuthorizationToken ( { libraryId , objectId , versionHash , partHash , encryption , audienceData , update = false , channelAuth = false , noCache = false , noAuth = false } ) { const initialNoCache = this . noCache ; try { if ( noCache && ! this . noCache ) { this . noCache = true ; } let authorizationToken ; if ( channelAuth ) { authorizationToken = await this . GenerateChannelContentToken ( { objectId , audienceData } ) ; } else { authorizationToken = await this . GenerateAuthorizationToken ( { libraryId , objectId , versionHash , partHash , encryption , update , noAuth } ) ; } return authorizationToken ; } catch ( error ) { throw error ; } finally { this . noCache = initialNoCache ; } }
Wrapper for GenerateAuthorizationHeader to allow for per-call disabling of cache
Wrapper for GenerateAuthorizationHeader to allow for per - call disabling of cache
// noCache enabled for this call