@ctx-core/jwt 10.5.52 → 10.5.57
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/_types/JwtToken.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { error_o_T } from '
|
|
2
|
-
import {
|
|
1
|
+
import type { error_o_T } from 'ctx-core/error'
|
|
2
|
+
import type { nullish } from 'ctx-core/function'
|
|
3
3
|
export interface JwtToken {
|
|
4
4
|
access_token:string
|
|
5
5
|
token_type:string
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BadCredentialsError } from '
|
|
1
|
+
import type { BadCredentialsError } from 'ctx-core/error'
|
|
2
2
|
export declare function jwt__expiration__error_(jwt_token:string):BadCredentialsError|null
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="ctx-core" />
|
|
2
|
+
import { bad_credentials_error_ } from 'ctx-core/error'
|
|
2
3
|
import { jwt__expiration__is_valid_ } from '../jwt__expiration__is_valid_/index.js'
|
|
3
4
|
/**
|
|
4
5
|
* @param {string}jwt_token
|
|
5
|
-
* @returns {
|
|
6
|
+
* @returns {BadCredentialsError}
|
|
6
7
|
*/
|
|
7
8
|
export function jwt__expiration__error_(jwt_token) {
|
|
8
9
|
return (
|
|
9
10
|
jwt__expiration__is_valid_(jwt_token)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
? null
|
|
12
|
+
: bad_credentials_error_('Session Expired', {
|
|
13
|
+
data: { jwt_token },
|
|
14
|
+
}))
|
|
14
15
|
}
|
package/jwt_token_exp_/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/jwt",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.57",
|
|
4
4
|
"description": "ctx-core jwt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -34,14 +34,12 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"
|
|
38
|
-
"@ctx-core/error": "^12.4.51",
|
|
39
|
-
"@ctx-core/function": "^21.24.6"
|
|
37
|
+
"ctx-core": "^5.1.0"
|
|
40
38
|
},
|
|
41
39
|
"devDependencies": {
|
|
42
40
|
"c8": "^8.0.1",
|
|
43
41
|
"check-dts": "^0.7.2",
|
|
44
|
-
"tsx": "^4.
|
|
42
|
+
"tsx": "^4.7.0",
|
|
45
43
|
"typescript": "next",
|
|
46
44
|
"uvu": "^0.5.6"
|
|
47
45
|
},
|