lib/authenticate.js
async function getSession (url) {
  const token = await loadToken(url)
  if (!token) return null
  const header = jwt.decode(token)
  if (!header) return null
  const now = Math.floor(Date.now() / 1000)
  if (header.exp <= now) return null
  return header
}
async function getSession (url) {
  const token = await loadToken(url)
  if (!token) return null
  const header = jwt.decode(token)
  if (!header) return null
  const now = Math.floor(Date.now() / 1000)
  if (header.exp <= now) return null
  return header
}
async function getSession ( url ) { const token = await loadToken ( url ) if ( ! token ) return null const header = jwt . decode ( token ) if ( ! header ) return null const now = Math . floor ( Date . now ( ) / 1000 ) if ( header . exp <= now ) return null return header }
Get the session data for an Upload Server URL.
Get the session data for an Upload Server URL .