text: const RefreshToken = require('../models/refreshToken.model');
  const moment = require('moment-timezone');
  const { jwtExpirationInterval } = require('../../config/vars');
  
  
  /**
  * Returns a formated object with tokens
  * @private
  */
  function generateTokenResponse(user, accessToken) {
    const tokenType = 'Bearer';
    const refreshToken = RefreshToken.generate(user).token;
    const expiresIn = moment().add(jwtExpirationInterval, 'minutes');
    return {
      tokenType, accessToken, refreshToken, expiresIn,
    };
  }
  
  module.exports = {
    generateTokenResponse
  }