text: /**
   * @param {number} timeToLive
   */
  var AuthenticationManager = function(timeToLive) {
    this.timeToLive = timeToLive;
    this.tokens = new Map;
  };
  
  /**
   * @param {string} tokenId
   * @param {number} currentTime
   * @return {void}
   */
  AuthenticationManager.prototype.generate = function(tokenId, currentTime) {
    this.tokens.set(tokenId, currentTime + this.timeToLive);
  };
  
  /**
   * @param {string} tokenId
   * @param {number} currentTime
   * @return {void}
   */
  AuthenticationManager.prototype.renew = function(tokenId, currentTime) {
    if (this.tokens.has(tokenId)) {
      let time = this.tokens.get(tokenId);
      if (time > currentTime)
        this.tokens.set(tokenId, currentTime + this.timeToLive);
    }
  };
  
  /**
   * @param {number} currentTime
   * @return {number}
   */
  AuthenticationManager.prototype.countUnexpiredTokens = function(currentTime) {
    let count = 0;
    for (let v of this.tokens.values()) {
      if (v > currentTime) count++;
    }
    return count;
  };
  
  /**
   * Your AuthenticationManager object will be instantiated and called as such:
   * var obj = new AuthenticationManager(timeToLive)
   * obj.generate(tokenId,currentTime)
   * obj.renew(tokenId,currentTime)
   * var param_3 = obj.countUnexpiredTokens(currentTime)
   */