code: function(tokenStr) {
              if (typeof tokenStr !== 'string') {
                  return null;
              }
              var token = tokenCache[tokenStr];
              if (token !== undefined) {
                  return token;
              } else {
                  try {
                      token = tokens.validate(tokenStr, trustedPubKey);
                      tokenCache[tokenStr] = token;
                      return token;
                  } catch (err) {
                      // did not validate, cache negative result.
                      tokenCache[tokenStr] = null;
                      return null;
                  }
              }
          }
docs: /*
  `null` means cached  with a negative result (invalid token),
  `undefined` means not in the cache,
  otherwise you get the validated token.