@payello-module/jwt 0.1.4 → 0.1.5
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/dist/JWT.js +3 -1
- package/dist/JwtExtract.d.ts +2 -0
- package/package.json +1 -1
package/dist/JWT.js
CHANGED
@@ -67,7 +67,9 @@ export class JWT {
|
|
67
67
|
// Returns an object containing the extracted components of the JWT.
|
68
68
|
return {
|
69
69
|
header: header,
|
70
|
+
headerRaw: bits[0],
|
70
71
|
payload: payload,
|
72
|
+
payloadRaw: bits[1],
|
71
73
|
signature: bits[2]
|
72
74
|
};
|
73
75
|
}
|
@@ -86,7 +88,7 @@ export class JWT {
|
|
86
88
|
}
|
87
89
|
let verify = false;
|
88
90
|
// Preparation of the data to verify the signature.
|
89
|
-
const data = `${
|
91
|
+
const data = `${extracted.headerRaw}.${extracted.payloadRaw}`;
|
90
92
|
// Verification of the signature based on the algorithm specified in the header.
|
91
93
|
switch (extracted.header.alg) {
|
92
94
|
case 'HS256':
|
package/dist/JwtExtract.d.ts
CHANGED