mirror of
https://github.com/hanzoai/node-jsonwebtoken.git
synced 2026-09-24 17:00:48 +00:00
This change extracts all tests in the current test files related to expiresIn and exp into a single test file. It also adds several missing tests.
14 lines
214 B
JavaScript
14 lines
214 B
JavaScript
'use strict';
|
|
|
|
function base64UrlEncode(str) {
|
|
return Buffer.from(str).toString('base64')
|
|
.replace(/\=/g, "")
|
|
.replace(/\+/g, "-")
|
|
.replace(/\//g, "_")
|
|
;
|
|
}
|
|
|
|
module.exports = {
|
|
base64UrlEncode,
|
|
};
|