client-certificate-auth 1.2.0 → 1.3.0
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/lib/extractor.cjs +20 -0
- package/lib/extractor.d.cts +13 -0
- package/lib/helpers.cjs +20 -0
- package/lib/helpers.d.cts +13 -0
- package/lib/helpers.d.ts +2 -6
- package/lib/parsers.cjs +20 -0
- package/lib/parsers.d.cts +13 -0
- package/package.json +27 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* client-certificate-auth/extractor - CommonJS wrapper
|
|
3
|
+
* Copyright (C) 2013-2026 Tony Gies
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
let _module;
|
|
10
|
+
|
|
11
|
+
async function load() {
|
|
12
|
+
// Stryker disable next-line ConditionalExpression,BlockStatement: test ordering caches _module from prior test; ConditionalExpression→true (always re-import) re-imports same module successfully; BlockStatement→{} uses cached value
|
|
13
|
+
if (!_module) {
|
|
14
|
+
// Stryker disable next-line StringLiteral: test ordering caches _module; StringLiteral→"" fails import but cached value masks it
|
|
15
|
+
_module = await import('./extractor.js');
|
|
16
|
+
}
|
|
17
|
+
return _module;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = { load };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* client-certificate-auth/extractor - CommonJS type declarations
|
|
3
|
+
* Copyright (C) 2013-2026 Tony Gies
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type * as ExtractorModule from './extractor.js';
|
|
8
|
+
|
|
9
|
+
declare const extractor: {
|
|
10
|
+
load(): Promise<typeof ExtractorModule>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export = extractor;
|
package/lib/helpers.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* client-certificate-auth/helpers - CommonJS wrapper
|
|
3
|
+
* Copyright (C) 2013-2026 Tony Gies
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
let _module;
|
|
10
|
+
|
|
11
|
+
async function load() {
|
|
12
|
+
// Stryker disable next-line ConditionalExpression,BlockStatement: test ordering caches _module from prior test; ConditionalExpression→true (always re-import) re-imports same module successfully; BlockStatement→{} uses cached value
|
|
13
|
+
if (!_module) {
|
|
14
|
+
// Stryker disable next-line StringLiteral: test ordering caches _module; StringLiteral→"" fails import but cached value masks it
|
|
15
|
+
_module = await import('./helpers.js');
|
|
16
|
+
}
|
|
17
|
+
return _module;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = { load };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* client-certificate-auth/helpers - CommonJS type declarations
|
|
3
|
+
* Copyright (C) 2013-2026 Tony Gies
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type * as HelpersModule from './helpers.js';
|
|
8
|
+
|
|
9
|
+
declare const helpers: {
|
|
10
|
+
load(): Promise<typeof HelpersModule>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export = helpers;
|
package/lib/helpers.d.ts
CHANGED
|
@@ -4,13 +4,9 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type {
|
|
8
|
-
import type { ClientCertRequest } from './clientCertificateAuth.js';
|
|
7
|
+
import type { ValidationCallback } from './clientCertificateAuth.js';
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
* Validation callback for clientCertificateAuth middleware.
|
|
12
|
-
*/
|
|
13
|
-
export type ValidationCallback = (cert: PeerCertificate | DetailedPeerCertificate, req?: ClientCertRequest) => boolean | Promise<boolean>;
|
|
9
|
+
export type { ValidationCallback };
|
|
14
10
|
|
|
15
11
|
/**
|
|
16
12
|
* Distinguished Name fields for matching.
|
package/lib/parsers.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* client-certificate-auth/parsers - CommonJS wrapper
|
|
3
|
+
* Copyright (C) 2013-2026 Tony Gies
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
let _module;
|
|
10
|
+
|
|
11
|
+
async function load() {
|
|
12
|
+
// Stryker disable next-line ConditionalExpression,BlockStatement: test ordering caches _module from prior test; ConditionalExpression→true (always re-import) re-imports same module successfully; BlockStatement→{} uses cached value
|
|
13
|
+
if (!_module) {
|
|
14
|
+
// Stryker disable next-line StringLiteral: test ordering caches _module; StringLiteral→"" fails import but cached value masks it
|
|
15
|
+
_module = await import('./parsers.js');
|
|
16
|
+
}
|
|
17
|
+
return _module;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = { load };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* client-certificate-auth/parsers - CommonJS type declarations
|
|
3
|
+
* Copyright (C) 2013-2026 Tony Gies
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type * as ParsersModule from './parsers.js';
|
|
8
|
+
|
|
9
|
+
declare const parsers: {
|
|
10
|
+
load(): Promise<typeof ParsersModule>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export = parsers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "client-certificate-auth",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Express/Connect middleware for mTLS client certificate authentication with reverse proxy support (AWS ALB, Envoy, Cloudflare, Traefik)",
|
|
5
5
|
"homepage": "https://github.com/tgies/client-certificate-auth",
|
|
6
6
|
"bugs": {
|
|
@@ -26,23 +26,48 @@
|
|
|
26
26
|
"import": {
|
|
27
27
|
"types": "./lib/parsers.d.ts",
|
|
28
28
|
"default": "./lib/parsers.js"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./lib/parsers.d.cts",
|
|
32
|
+
"default": "./lib/parsers.cjs"
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
"./helpers": {
|
|
32
36
|
"import": {
|
|
33
37
|
"types": "./lib/helpers.d.ts",
|
|
34
38
|
"default": "./lib/helpers.js"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./lib/helpers.d.cts",
|
|
42
|
+
"default": "./lib/helpers.cjs"
|
|
35
43
|
}
|
|
36
44
|
},
|
|
37
45
|
"./extractor": {
|
|
38
46
|
"import": {
|
|
39
47
|
"types": "./lib/extractor.d.ts",
|
|
40
48
|
"default": "./lib/extractor.js"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./lib/extractor.d.cts",
|
|
52
|
+
"default": "./lib/extractor.cjs"
|
|
41
53
|
}
|
|
42
54
|
}
|
|
43
55
|
},
|
|
44
56
|
"main": "./lib/clientCertificateAuth.cjs",
|
|
45
57
|
"types": "./lib/clientCertificateAuth.d.ts",
|
|
58
|
+
"typesVersions": {
|
|
59
|
+
"*": {
|
|
60
|
+
"parsers": [
|
|
61
|
+
"./lib/parsers.d.ts"
|
|
62
|
+
],
|
|
63
|
+
"helpers": [
|
|
64
|
+
"./lib/helpers.d.ts"
|
|
65
|
+
],
|
|
66
|
+
"extractor": [
|
|
67
|
+
"./lib/extractor.d.ts"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
46
71
|
"engines": {
|
|
47
72
|
"node": ">= 20"
|
|
48
73
|
},
|
|
@@ -52,7 +77,7 @@
|
|
|
52
77
|
"@stryker-mutator/core": "^9.5.1",
|
|
53
78
|
"@stryker-mutator/jest-runner": "^9.5.1",
|
|
54
79
|
"@types/express": "^5.0.6",
|
|
55
|
-
"@types/node": "^25.2.
|
|
80
|
+
"@types/node": "^25.2.3",
|
|
56
81
|
"c8": "^10.1.3",
|
|
57
82
|
"eslint": "^9.17.0",
|
|
58
83
|
"globals": "^17.3.0",
|