{"size": 227, "ext": "js", "max_stars_repo_path": "node-koa/utils/verifyToken.js", "max_stars_repo_name": "zky1017/11", "max_stars_repo_stars_event_min_datetime": "2021-04-10T05:23:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-22T03:58:59.000Z", "max_issues_repo_path": "node-koa/utils/verifyToken.js", "max_issues_repo_name": "zky1017/11", "max_issues_repo_issues_event_min_datetime": "2021-11-24T03:46:11.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-24T03:46:11.000Z", "max_forks_repo_path": "node-koa/utils/verifyToken.js", "max_forks_repo_name": "zky1017/11", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 21, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 25.2222222222, "max_line_length": 67, "alphanum_fraction": 0.7004405286}
const jwt = require('jsonwebtoken');
const tokenConfig = require('../config/token.config');

const verifyToken = (token) => {
    return jwt.verify(token.split(' ')[1], tokenConfig.privateKey);
}

module.exports = verifyToken;
