static async create(
    user,
    expiresIn,
    description,
    { creatorId = null, apiKeyId = null, refresh, bypassMaxTTL = false } = {},
  ) {
    const token = await global.kuzzle.ask("core:security:token:create", user, {
      bypassMaxTTL,
      expiresIn,
      type: "apiKey",
    });

    const fingerprint = sha256(token.jwt);
    const apiKey = new ApiKey(
      {
        description,
        expiresAt: token.expiresAt,
        fingerprint,
        ttl: token.ttl,
        userId: user._id,
      },
      apiKeyId || fingerprint,
    );
    await apiKey.save({ refresh, userId: creatorId });

    apiKey.token = token.jwt;

    return apiKey;
  }
Creates a new API key for an user

@param {User} user
@param {String} expiresIn - API key expiration date in ms format
@param {String} description
@param {Object} options - creatorId (null), apiKeyId (null), refresh (null), bypassMaxTTL (false)

@returns {ApiKey}