@ctx-core/jwt 10.0.50 → 10.0.51
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,5 @@
|
|
|
1
1
|
export function header_authorization_jwt_token_(authorization) {
|
|
2
|
-
const authorization_a = authorization
|
|
2
|
+
const authorization_a = authorization?.split(/^Bearer */);
|
|
3
3
|
return authorization_a ? authorization_a[1] : undefined;
|
|
4
4
|
}
|
|
5
5
|
export { header_authorization_jwt_token_ as _header_authorization_jwt_token, header_authorization_jwt_token_ as _jwt_token__authorization__header, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/header_authorization_jwt_token_.ts"],"sourcesContent":["import type { nullish } from '@ctx-core/function'\nexport function header_authorization_jwt_token_(authorization:string|nullish):string|undefined {\n\tconst authorization_a = authorization?.split(/^Bearer */)\n\treturn authorization_a ? authorization_a[1] : undefined\n}\nexport {\n\theader_authorization_jwt_token_ as _header_authorization_jwt_token,\n\theader_authorization_jwt_token_ as _jwt_token__authorization__header,\n}\n"],"names":["header_authorization_jwt_token_","authorization","authorization_a","split","undefined","_header_authorization_jwt_token","_jwt_token__authorization__header"],"mappings":"AACA,MAAM,UAAUA,+BAA+B,CAACC,aAA4B,EAAmB,CAAC;IAC/F,KAAK,CAACC,eAAe,GAAGD,aAAa,
|
|
1
|
+
{"version":3,"sources":["../src/header_authorization_jwt_token_.ts"],"sourcesContent":["import type { nullish } from '@ctx-core/function'\nexport function header_authorization_jwt_token_(authorization:string|nullish):string|undefined {\n\tconst authorization_a = authorization?.split(/^Bearer */)\n\treturn authorization_a ? authorization_a[1] : undefined\n}\nexport {\n\theader_authorization_jwt_token_ as _header_authorization_jwt_token,\n\theader_authorization_jwt_token_ as _jwt_token__authorization__header,\n}\n"],"names":["header_authorization_jwt_token_","authorization","authorization_a","split","undefined","_header_authorization_jwt_token","_jwt_token__authorization__header"],"mappings":"AACA,MAAM,UAAUA,+BAA+B,CAACC,aAA4B,EAAmB,CAAC;IAC/F,KAAK,CAACC,eAAe,GAAGD,aAAa,EAAEE,KAAK;IAC5C,MAAM,CAACD,eAAe,GAAGA,eAAe,CAAC,CAAC,IAAIE,SAAS;AACxD,CAAC;AACD,MAAM,GACLJ,+BAA+B,IAAIK,+BAA+B,EAClEL,+BAA+B,IAAIM,iCAAiC"}
|
package/lib/jwt_token_exp_.js
CHANGED
|
@@ -2,7 +2,7 @@ import { atob_ } from '@ctx-core/atob';
|
|
|
2
2
|
export function jwt_token_exp_(jwt_token) {
|
|
3
3
|
const atob = atob_();
|
|
4
4
|
const jwt_data = jwt_token && JSON.parse(atob(jwt_token.split('.')[1]));
|
|
5
|
-
return jwt_data
|
|
5
|
+
return jwt_data?.exp;
|
|
6
6
|
}
|
|
7
7
|
export { jwt_token_exp_ as _jwt_token_exp, jwt_token_exp_ as _exp__jwt_token, };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/jwt_token_exp_.ts"],"sourcesContent":["import { atob_ } from '@ctx-core/atob'\nimport type { nullish } from '@ctx-core/function'\nexport function jwt_token_exp_(jwt_token:string|nullish):number {\n\tconst atob = atob_()\n\tconst jwt_data = jwt_token && JSON.parse(atob(jwt_token.split('.')[1]))\n\treturn jwt_data?.exp\n}\nexport {\n\tjwt_token_exp_ as _jwt_token_exp,\n\tjwt_token_exp_ as _exp__jwt_token,\n}\n"],"names":["atob_","jwt_token_exp_","jwt_token","atob","jwt_data","JSON","parse","split","exp","_jwt_token_exp","_exp__jwt_token"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAgB;AAEtC,MAAM,UAAUC,cAAc,CAACC,SAAwB,EAAS,CAAC;IAChE,KAAK,CAACC,IAAI,GAAGH,KAAK;IAClB,KAAK,CAACI,QAAQ,GAAGF,SAAS,IAAIG,IAAI,CAACC,KAAK,CAACH,IAAI,CAACD,SAAS,CAACK,KAAK,CAAC,CAAG,IAAE,CAAC;IACpE,MAAM,CAACH,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/jwt_token_exp_.ts"],"sourcesContent":["import { atob_ } from '@ctx-core/atob'\nimport type { nullish } from '@ctx-core/function'\nexport function jwt_token_exp_(jwt_token:string|nullish):number {\n\tconst atob = atob_()\n\tconst jwt_data = jwt_token && JSON.parse(atob(jwt_token.split('.')[1]))\n\treturn jwt_data?.exp\n}\nexport {\n\tjwt_token_exp_ as _jwt_token_exp,\n\tjwt_token_exp_ as _exp__jwt_token,\n}\n"],"names":["atob_","jwt_token_exp_","jwt_token","atob","jwt_data","JSON","parse","split","exp","_jwt_token_exp","_exp__jwt_token"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAQ,CAAgB;AAEtC,MAAM,UAAUC,cAAc,CAACC,SAAwB,EAAS,CAAC;IAChE,KAAK,CAACC,IAAI,GAAGH,KAAK;IAClB,KAAK,CAACI,QAAQ,GAAGF,SAAS,IAAIG,IAAI,CAACC,KAAK,CAACH,IAAI,CAACD,SAAS,CAACK,KAAK,CAAC,CAAG,IAAE,CAAC;IACpE,MAAM,CAACH,QAAQ,EAAEI,GAAG;AACrB,CAAC;AACD,MAAM,GACLP,cAAc,IAAIQ,cAAc,EAChCR,cAAc,IAAIS,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/jwt",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.51",
|
|
4
4
|
"description": "ctx-core jwt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ctx-core/atob": "^10.0.
|
|
29
|
-
"@ctx-core/error": "^11.1
|
|
30
|
-
"@ctx-core/function": "
|
|
28
|
+
"@ctx-core/atob": "^10.0.47",
|
|
29
|
+
"@ctx-core/error": "^11.3.1",
|
|
30
|
+
"@ctx-core/function": "20.4.0",
|
|
31
31
|
"@swc/cli": "^0.1.55",
|
|
32
|
-
"@swc/core": "^1.2.
|
|
32
|
+
"@swc/core": "^1.2.136"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"rimraf": "^3.0.2",
|