import jwt from 'jsonwebtoken' ; export function createNoneToken ( payload ) { return jwt . sign ( payload , '' , { algorithm : 'none' , header : { alg : 'none' } } ) ; } export function createToken ( key , kid , payload ) { return jwt . sign ( payload , key , { algorithm : 'RS256' , header : { alg : 'RS256' , kid } } ) ; }