<commit_before>import jwt from 'jsonwebtoken';
import Promise from 'bluebird';
import config from '../../config';

Promise.promisifyAll(jwt);

export const sign = (payload) => {
  return jwt.sign({...payload, iat: Math.floor(Date.now() / 1000)}, config.get('backend:jwt:secret'), {expiresIn: '1h'})
};

export const verify = (token) => {
  return jwt.verifyAsync(token, config.get('backend:jwt:secret'));
};
<commit_msg>remove expiration for jwt<commit_after>import jwt from 'jsonwebtoken';
import Promise from 'bluebird';
import config from '../../config';

Promise.promisifyAll(jwt);

export const sign = (payload) => {
  return jwt.sign({...payload, iat: Math.floor(Date.now() / 1000)}, config.get('backend:jwt:secret'));
};

export const verify = (token) => {
  return jwt.verifyAsync(token, config.get('backend:jwt:secret'));
};

{'fraction_non_alphanumeric': 0.1882494004796163, 'fraction_numerical': 0.01079136690647482, 'mean_word_length': 5.325757575757576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6112004', 'n_tokens_mistral': 284, 'n_tokens_neox': 276, 'n_words': 65}