lib/authenticate.js
function validateToken (token) {
  const header = jwt.decode(token)
  const now = Math.floor(Date.now() / 1000)
  return header && header.exp > now
}
function validateToken (token) {
  const header = jwt.decode(token)
  const now = Math.floor(Date.now() / 1000)
  return header && header.exp > now
}
function validateToken ( token ) { const header = jwt . decode ( token ) const now = Math . floor ( Date . now ( ) / 1000 ) return header && header . exp > now }
Check that a JWT has not expired.
Check that a JWT has not expired .