@ctx-core/jwt 10.1.10 → 10.1.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @ctx-core/jwt
2
2
 
3
+ ## 10.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: jwt*token_exp*: jwt_token: return null when raw jwt_token does not have '.' format
8
+ - Updated dependencies
9
+ - @ctx-core/error@11.5.0
10
+
11
+ ## 10.1.12
12
+
13
+ ### Patch Changes
14
+
15
+ - @ctx-core/atob: ^10.0.56 -> ^10.0.57
16
+
17
+ ## 10.1.11
18
+
19
+ ### Patch Changes
20
+
21
+ - @ctx-core/error: ^11.4.6 -> ^11.4.7
22
+ - @ctx-core/atob: ^10.0.55 -> ^10.0.56
23
+
3
24
  ## 10.1.10
4
25
 
5
26
  ### Patch Changes
package/COMMIT_EDITMSG ADDED
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/jwt",
3
- "version": "10.1.10",
3
+ "version": "10.1.13",
4
4
  "description": "ctx-core jwt",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -24,14 +24,14 @@
24
24
  "./package.json": "./package.json"
25
25
  },
26
26
  "dependencies": {
27
- "@ctx-core/atob": "^10.0.55",
28
- "@ctx-core/error": "^11.4.6",
27
+ "@ctx-core/atob": "^10.0.57",
28
+ "@ctx-core/error": "^11.5.0",
29
29
  "@ctx-core/function": "^20.8.0",
30
30
  "@swc/cli": "^0.1.57",
31
- "@swc/core": "^1.2.177"
31
+ "@swc/core": "^1.2.196"
32
32
  },
33
33
  "devDependencies": {
34
- "c8": "^7.11.2",
34
+ "c8": "^7.11.3",
35
35
  "check-dts": "^0.6.7",
36
36
  "tsm": "^2.2.1",
37
37
  "typescript": "next",
@@ -6,7 +6,9 @@ import { atob_ } from '@ctx-core/atob'
6
6
  export function jwt_token_exp_(jwt_token) {
7
7
  const atob = atob_()
8
8
  if (!jwt_token) return null
9
- const jwt_data = JSON.parse(atob(jwt_token.split('.')[1]))
9
+ const atob_jwt_data = jwt_token.split('.')[1]
10
+ if (!atob_jwt_data) return null
11
+ const jwt_data = JSON.parse(atob(atob_jwt_data))
10
12
  return jwt_data?.exp
11
13
  }
12
14
  export { jwt_token_exp_ as _jwt_token_exp, jwt_token_exp_ as _exp__jwt_token, }