async function verifyJwt(token, pem, algorithms) {
	return new Promise((resolve, reject) => {
		JsonWebToken.verify(token, pem, algorithms, (err, decoded) => {
			if (err) {
				log.error('verifyJwt failed', { token, pem, algorithms }, err);
				return reject(err);
			}
			return resolve(decoded);
		});
	});
}
// verifyJwt wraps the callback-based JsonWebToken.verify function in a promise.
verifyJwt wraps the callback-based JsonWebToken.verify function in a promise.
verifyJwt wraps the callback - based JsonWebToken . verify function in a promise .
async function verifyJwt(token, pem, algorithms) {
	return new Promise((resolve, reject) => {
		JsonWebToken.verify(token, pem, algorithms, (err, decoded) => {
			if (err) {
				log.error('verifyJwt failed', { token, pem, algorithms }, err);
				return reject(err);
			}
			return resolve(decoded);
		});
	});
}
async function verifyJwt ( token , pem , algorithms ) { return new Promise ( ( resolve , reject ) => { JsonWebToken . verify ( token , pem , algorithms , ( err , decoded ) => { if ( err ) { log . error ( 'verifyJwt failed' , { token , pem , algorithms } , err ) ; return reject ( err ) ; } return resolve ( decoded ) ; } ) ; } ) ; }
verifyJwt wraps the callback-based JsonWebToken.verify function in a promise.
verifyJwt wraps the callback - based JsonWebToken . verify function in a promise .