{"size": 323, "ext": "js", "max_stars_repo_path": "app/server/Authentication.js", "max_stars_repo_name": "achillesrasquinha/k.ai", "max_stars_repo_stars_event_min_datetime": "2017-01-24T03:05:22.000Z", "max_stars_repo_stars_event_max_datetime": "2018-03-21T18:44:59.000Z", "max_issues_repo_path": "app/server/Authentication.js", "max_issues_repo_name": "achillesrasquinha/k.ai", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/server/Authentication.js", "max_forks_repo_name": "achillesrasquinha/k.ai", "max_forks_repo_forks_event_min_datetime": "2017-02-01T14:48:05.000Z", "max_forks_repo_forks_event_max_datetime": "2019-01-07T19:08:03.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 19.0, "max_line_length": 51, "alphanum_fraction": 0.693498452}
import jwt from 'jsonwebtoken'

import ServerConfig from './../config/ServerConfig'

const createUserToken = (user) => {
  const token = jwt.sign({
    id: user.id,
    firstname: user.firstname,
    lastname: user.lastname,
    email: user.email
  }, ServerConfig.JWT_SECRET)

  return token
}

export { createUserToken }
