lib/cache-driver.js
function CacheDriver(callContext, authority, resource, clientId, cache, refreshFunction) {
  this._callContext = callContext;
  this._log = new Logger('CacheDriver', callContext._logContext);
  this._authority = authority;
  this._resource = resource;
  this._clientId = clientId;
  this._cache = cache || nopCache;
  this._refreshFunction = refreshFunction;
}
function CacheDriver(callContext, authority, resource, clientId, cache, refreshFunction) {
  this._callContext = callContext;
  this._log = new Logger('CacheDriver', callContext._logContext);
  this._authority = authority;
  this._resource = resource;
  this._clientId = clientId;
  this._cache = cache || nopCache;
  this._refreshFunction = refreshFunction;
}
function CacheDriver ( callContext , authority , resource , clientId , cache , refreshFunction ) { this . _callContext = callContext ; this . _log = new Logger ( 'CacheDriver' , callContext . _logContext ) ; this . _authority = authority ; this . _resource = resource ; this . _clientId = clientId ; this . _cache = cache || nopCache ; this . _refreshFunction = refreshFunction ; }
This is the callback that is passed to all acquireToken variants below.
@callback RefreshEntryFunction
@memberOf CacheDriver
@param {object}  tokenResponse    A token response to refresh.
@param {string}  [resource]       The resource for which to obtain the token if it is different from the original token.
@param {AcquireTokenCallback} callback   Called on completion with an error or a new entry to add to the cache.
 
Constructs a new CacheDriver object.
@constructor
@private
@param {object} callContext Contains any context information that applies to the request.
@param {string} authority
@param {TokenCache} [cache]     A token cache to use.  If none is passed then the CacheDriver instance
will not cache.
@param {RefreshEntryFunction} refreshFunction
This is the callback that is passed to all acquireToken variants below .