@vulkano/core 1.5.2 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap/express.js +1 -1
- package/bun.lockb +0 -0
- package/libs/Jwt.js +8 -1
- package/package.json +1 -1
package/bootstrap/express.js
CHANGED
package/bun.lockb
ADDED
|
Binary file
|
package/libs/Jwt.js
CHANGED
|
@@ -119,10 +119,12 @@ module.exports = {
|
|
|
119
119
|
decode(token, customKey) {
|
|
120
120
|
|
|
121
121
|
const {
|
|
122
|
-
key
|
|
122
|
+
key,
|
|
123
|
+
expiration: allowExpiration
|
|
123
124
|
} = this.getConfig();
|
|
124
125
|
|
|
125
126
|
let data = {};
|
|
127
|
+
|
|
126
128
|
try {
|
|
127
129
|
|
|
128
130
|
const payload = jwtSimple.decode(token, customKey || key);
|
|
@@ -143,6 +145,11 @@ module.exports = {
|
|
|
143
145
|
return null;
|
|
144
146
|
}
|
|
145
147
|
|
|
148
|
+
// Ignore expiration field
|
|
149
|
+
if (allowExpiration === false) {
|
|
150
|
+
return data;
|
|
151
|
+
}
|
|
152
|
+
|
|
146
153
|
// Expiration must be required
|
|
147
154
|
if (!expiration) {
|
|
148
155
|
console.log('JWT Without expiration date');
|