win-sso 1.3.0 → 1.3.2
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/os-supported.d.ts +1 -2
- package/dist/os-supported.js +2 -4
- package/dist/utils/debug.logger.d.ts +0 -1
- package/dist/utils/i.win-sso-addon.d.ts +7 -0
- package/dist/utils/i.win-sso-addon.js +2 -0
- package/dist/win-sso.d.ts +13 -22
- package/dist/win-sso.js +16 -24
- package/package.json +14 -17
- package/prebuilds/win32-ia32/win-sso.node +0 -0
- package/prebuilds/win32-x64/win-sso.node +0 -0
- package/src/os-supported.ts +1 -2
- package/src/utils/i.win-sso-addon.ts +15 -0
- package/src/win-sso.ts +18 -25
- package/prebuilds/win32-ia32/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
package/dist/os-supported.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns true if the current platform is supported by the win-sso module. Only Windows OSs are supported.
|
|
3
3
|
* If false, all other methods in the module will throw.
|
|
4
|
-
*
|
|
5
|
-
* @returns {boolean} Is the os supported
|
|
4
|
+
* @returns Is the os supported
|
|
6
5
|
*/
|
|
7
6
|
export declare function osSupported(): boolean;
|
package/dist/os-supported.js
CHANGED
|
@@ -3,15 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.osSupported =
|
|
6
|
+
exports.osSupported = osSupported;
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
/**
|
|
9
9
|
* Returns true if the current platform is supported by the win-sso module. Only Windows OSs are supported.
|
|
10
10
|
* If false, all other methods in the module will throw.
|
|
11
|
-
*
|
|
12
|
-
* @returns {boolean} Is the os supported
|
|
11
|
+
* @returns Is the os supported
|
|
13
12
|
*/
|
|
14
13
|
function osSupported() {
|
|
15
14
|
return os_1.default.platform() === "win32";
|
|
16
15
|
}
|
|
17
|
-
exports.osSupported = osSupported;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface IWinSsoAddon {
|
|
2
|
+
createAuthContext(securityPackage: string, targetHost: string | undefined, applicationData: Buffer, flags: number | undefined): number;
|
|
3
|
+
freeAuthContext(authContextId: number): void;
|
|
4
|
+
getLogonUserName(): string;
|
|
5
|
+
createAuthRequest(authContextId: number): Buffer;
|
|
6
|
+
createAuthResponse(authContextId: number, inToken: Buffer): Buffer;
|
|
7
|
+
}
|
package/dist/win-sso.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { PeerCertificate } from "tls";
|
|
4
2
|
/**
|
|
5
3
|
* Creates authentication tokens for NTLM or Negotiate handshake using the executing users credentials.
|
|
@@ -12,27 +10,24 @@ export declare class WinSso {
|
|
|
12
10
|
* Creates an authentication context for SSO.
|
|
13
11
|
* This allocates memory buffers, the freeAuthContext method should be called
|
|
14
12
|
* to free them (on error or after authentication is no longer needed)
|
|
15
|
-
*
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @param {PeerCertificate | undefined} peerCert The certificate of the target server
|
|
13
|
+
* @param securityPackage The name of the security package (NTLM or Negotiate)
|
|
14
|
+
* @param targetHost The FQDN hostname of the target (optional for NTLM, required for Kerberos)
|
|
15
|
+
* @param peerCert The certificate of the target server
|
|
19
16
|
* (optional, for HTTPS channel binding)
|
|
20
|
-
* @param
|
|
17
|
+
* @param flags Flags to set in the authentication context
|
|
21
18
|
* If not set, NTML defaults to no flags, while Negotiate defaults to ISC_REQ_MUTUAL_AUTH | ISC_REQ_SEQUENCE_DETECT
|
|
22
19
|
* (optional, allows customizing security features)
|
|
23
20
|
*/
|
|
24
21
|
constructor(securityPackage: string, targetHost: string | undefined, peerCert: PeerCertificate | undefined, flags: number | undefined);
|
|
25
22
|
/**
|
|
26
23
|
* Retrieves the username of the logged in user
|
|
27
|
-
*
|
|
28
|
-
* @returns {string} user name including domain
|
|
24
|
+
* @returns user name including domain
|
|
29
25
|
*/
|
|
30
26
|
static getLogonUserName(): string;
|
|
31
27
|
/**
|
|
32
28
|
* Transforms target TLS certificate into a channel binding application data buffer
|
|
33
|
-
*
|
|
34
|
-
* @
|
|
35
|
-
* @returns {Buffer} Application data buffer
|
|
29
|
+
* @param peerCert Target TLS certificate
|
|
30
|
+
* @returns Application data buffer
|
|
36
31
|
*/
|
|
37
32
|
private getChannelBindingsApplicationData;
|
|
38
33
|
/**
|
|
@@ -43,31 +38,27 @@ export declare class WinSso {
|
|
|
43
38
|
freeAuthContext(): void;
|
|
44
39
|
/**
|
|
45
40
|
* Creates an authentication request token
|
|
46
|
-
*
|
|
47
|
-
* @returns {Buffer} Raw token buffer
|
|
41
|
+
* @returns Raw token buffer
|
|
48
42
|
*/
|
|
49
43
|
createAuthRequest(): Buffer;
|
|
50
44
|
/**
|
|
51
45
|
* Creates an authentication request header
|
|
52
|
-
*
|
|
53
|
-
* @returns {string} The www-authenticate header
|
|
46
|
+
* @returns The www-authenticate header
|
|
54
47
|
*/
|
|
55
48
|
createAuthRequestHeader(): string;
|
|
56
49
|
/**
|
|
57
50
|
* Creates an authentication response token
|
|
58
|
-
*
|
|
59
|
-
* @param {string} inTokenHeader The www-authentication header received from the target
|
|
51
|
+
* @param inTokenHeader The www-authentication header received from the target
|
|
60
52
|
* in response to the authentication request
|
|
61
|
-
* @returns
|
|
53
|
+
* @returns Raw token buffer. May be empty if Negotiate handshake is complete.
|
|
62
54
|
*/
|
|
63
55
|
createAuthResponse(inTokenHeader: string): Buffer;
|
|
64
56
|
private isNtlmV1;
|
|
65
57
|
/**
|
|
66
58
|
* Creates an authentication response header
|
|
67
|
-
*
|
|
68
|
-
* @param {string} inTokenHeader The www-authentication header received from the target
|
|
59
|
+
* @param inTokenHeader The www-authentication header received from the target
|
|
69
60
|
* in response to the authentication request
|
|
70
|
-
* @returns
|
|
61
|
+
* @returns The www-authenticate header. May be an empty string if Negotiate handshake is complete.
|
|
71
62
|
*/
|
|
72
63
|
createAuthResponseHeader(inTokenHeader: string): string;
|
|
73
64
|
}
|
package/dist/win-sso.js
CHANGED
|
@@ -8,10 +8,11 @@ const debug_logger_1 = require("./utils/debug.logger");
|
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
let winSsoAddon;
|
|
10
10
|
try {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
11
12
|
winSsoAddon = require("node-gyp-build")(path_1.default.join(__dirname, ".."));
|
|
12
13
|
(0, debug_logger_1.debug)("Loaded win-sso native module");
|
|
13
14
|
}
|
|
14
|
-
catch (
|
|
15
|
+
catch (_a) {
|
|
15
16
|
(0, debug_logger_1.debug)("Could not load win-sso native module");
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
@@ -22,12 +23,11 @@ class WinSso {
|
|
|
22
23
|
* Creates an authentication context for SSO.
|
|
23
24
|
* This allocates memory buffers, the freeAuthContext method should be called
|
|
24
25
|
* to free them (on error or after authentication is no longer needed)
|
|
25
|
-
*
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @param {PeerCertificate | undefined} peerCert The certificate of the target server
|
|
26
|
+
* @param securityPackage The name of the security package (NTLM or Negotiate)
|
|
27
|
+
* @param targetHost The FQDN hostname of the target (optional for NTLM, required for Kerberos)
|
|
28
|
+
* @param peerCert The certificate of the target server
|
|
29
29
|
* (optional, for HTTPS channel binding)
|
|
30
|
-
* @param
|
|
30
|
+
* @param flags Flags to set in the authentication context
|
|
31
31
|
* If not set, NTML defaults to no flags, while Negotiate defaults to ISC_REQ_MUTUAL_AUTH | ISC_REQ_SEQUENCE_DETECT
|
|
32
32
|
* (optional, allows customizing security features)
|
|
33
33
|
*/
|
|
@@ -47,21 +47,18 @@ class WinSso {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Retrieves the username of the logged in user
|
|
50
|
-
*
|
|
51
|
-
* @returns {string} user name including domain
|
|
50
|
+
* @returns user name including domain
|
|
52
51
|
*/
|
|
53
52
|
static getLogonUserName() {
|
|
54
53
|
return winSsoAddon.getLogonUserName();
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
56
|
* Transforms target TLS certificate into a channel binding application data buffer
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
60
|
-
* @returns {Buffer} Application data buffer
|
|
57
|
+
* @param peerCert Target TLS certificate
|
|
58
|
+
* @returns Application data buffer
|
|
61
59
|
*/
|
|
62
60
|
getChannelBindingsApplicationData(peerCert) {
|
|
63
|
-
const
|
|
64
|
-
const hash = cert.fingerprint256.replace(/:/g, "");
|
|
61
|
+
const hash = peerCert.fingerprint256.replace(/:/g, "");
|
|
65
62
|
const hashBuf = Buffer.from(hash, "hex");
|
|
66
63
|
const tlsServerEndPoint = "tls-server-end-point:";
|
|
67
64
|
const applicationDataBuffer = Buffer.alloc(tlsServerEndPoint.length + hashBuf.length);
|
|
@@ -79,8 +76,7 @@ class WinSso {
|
|
|
79
76
|
}
|
|
80
77
|
/**
|
|
81
78
|
* Creates an authentication request token
|
|
82
|
-
*
|
|
83
|
-
* @returns {Buffer} Raw token buffer
|
|
79
|
+
* @returns Raw token buffer
|
|
84
80
|
*/
|
|
85
81
|
createAuthRequest() {
|
|
86
82
|
const token = winSsoAddon.createAuthRequest(this.authContextId);
|
|
@@ -89,8 +85,7 @@ class WinSso {
|
|
|
89
85
|
}
|
|
90
86
|
/**
|
|
91
87
|
* Creates an authentication request header
|
|
92
|
-
*
|
|
93
|
-
* @returns {string} The www-authenticate header
|
|
88
|
+
* @returns The www-authenticate header
|
|
94
89
|
*/
|
|
95
90
|
createAuthRequestHeader() {
|
|
96
91
|
const header = this.securityPackage + " " + this.createAuthRequest().toString("base64");
|
|
@@ -98,10 +93,9 @@ class WinSso {
|
|
|
98
93
|
}
|
|
99
94
|
/**
|
|
100
95
|
* Creates an authentication response token
|
|
101
|
-
*
|
|
102
|
-
* @param {string} inTokenHeader The www-authentication header received from the target
|
|
96
|
+
* @param inTokenHeader The www-authentication header received from the target
|
|
103
97
|
* in response to the authentication request
|
|
104
|
-
* @returns
|
|
98
|
+
* @returns Raw token buffer. May be empty if Negotiate handshake is complete.
|
|
105
99
|
*/
|
|
106
100
|
createAuthResponse(inTokenHeader) {
|
|
107
101
|
(0, debug_logger_1.debug)("Received www-authentication response", inTokenHeader);
|
|
@@ -137,7 +131,6 @@ class WinSso {
|
|
|
137
131
|
throw err;
|
|
138
132
|
}
|
|
139
133
|
}
|
|
140
|
-
// eslint-disable-next-line require-jsdoc
|
|
141
134
|
isNtlmV1(type2message) {
|
|
142
135
|
if (type2message.length >= 24) {
|
|
143
136
|
const inTokenFlags = type2message.readInt32BE(20);
|
|
@@ -149,10 +142,9 @@ class WinSso {
|
|
|
149
142
|
}
|
|
150
143
|
/**
|
|
151
144
|
* Creates an authentication response header
|
|
152
|
-
*
|
|
153
|
-
* @param {string} inTokenHeader The www-authentication header received from the target
|
|
145
|
+
* @param inTokenHeader The www-authentication header received from the target
|
|
154
146
|
* in response to the authentication request
|
|
155
|
-
* @returns
|
|
147
|
+
* @returns The www-authenticate header. May be an empty string if Negotiate handshake is complete.
|
|
156
148
|
*/
|
|
157
149
|
createAuthResponseHeader(inTokenHeader) {
|
|
158
150
|
const tokenBuffer = this.createAuthResponse(inTokenHeader);
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "win-sso",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "NTLM single-sign-on for Node.js. Only Windows OS supported.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "shx rm -rf dist && tsc",
|
|
8
|
-
"lint": "eslint src
|
|
8
|
+
"lint": "eslint src",
|
|
9
9
|
"test": "mocha --require ./test/ts.hooks.js test/**/*.spec.ts",
|
|
10
10
|
"prebuildify": "node prebuildify_env.js",
|
|
11
|
-
"native_prebuildify": "prebuildify --napi --strip --target
|
|
11
|
+
"native_prebuildify": "prebuildify --napi --strip --target 18.18.0",
|
|
12
12
|
"native_build": "node-gyp-build",
|
|
13
13
|
"install": "node install_env.js"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": "^
|
|
16
|
+
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -42,27 +42,24 @@
|
|
|
42
42
|
"bindings": "*",
|
|
43
43
|
"cross-spawn": "^7.0.3",
|
|
44
44
|
"debug": "^4.3.1",
|
|
45
|
-
"node-gyp": "^
|
|
45
|
+
"node-gyp": "^11.0.0",
|
|
46
46
|
"node-gyp-build": "^4.4.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/debug": "^4.1.7",
|
|
50
|
-
"@types/mocha": "^
|
|
51
|
-
"@types/node": "^
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
|
53
|
-
"@typescript-eslint/parser": "^5.20.0",
|
|
50
|
+
"@types/mocha": "^10.0.10",
|
|
51
|
+
"@types/node": "^22.10.10",
|
|
54
52
|
"asn1-parser": "^1.1.8",
|
|
55
|
-
"eslint": "^
|
|
56
|
-
"eslint-
|
|
57
|
-
"eslint-config-prettier": "^8.5.0",
|
|
58
|
-
"eslint-plugin-jsdoc": "^39.2.7",
|
|
53
|
+
"eslint": "^9.19.0",
|
|
54
|
+
"eslint-plugin-jsdoc": "^50.6.3",
|
|
59
55
|
"eslint-plugin-node": "^11.1.0",
|
|
60
|
-
"mocha": "^
|
|
61
|
-
"node-addon-api": "^
|
|
62
|
-
"prebuildify": "^
|
|
56
|
+
"mocha": "^11.1.0",
|
|
57
|
+
"node-addon-api": "^8.3.0",
|
|
58
|
+
"prebuildify": "^6.0.1",
|
|
63
59
|
"shx": "^0.3.4",
|
|
64
60
|
"ts-node": "^10.5.0",
|
|
65
|
-
"typescript": "^
|
|
61
|
+
"typescript": "^5.7.3",
|
|
62
|
+
"typescript-eslint": "^8.22.0"
|
|
66
63
|
},
|
|
67
64
|
"gypfile": true
|
|
68
65
|
}
|
|
Binary file
|
|
Binary file
|
package/src/os-supported.ts
CHANGED
|
@@ -3,8 +3,7 @@ import os from "os";
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns true if the current platform is supported by the win-sso module. Only Windows OSs are supported.
|
|
5
5
|
* If false, all other methods in the module will throw.
|
|
6
|
-
*
|
|
7
|
-
* @returns {boolean} Is the os supported
|
|
6
|
+
* @returns Is the os supported
|
|
8
7
|
*/
|
|
9
8
|
export function osSupported(): boolean {
|
|
10
9
|
return os.platform() === "win32";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IWinSsoAddon {
|
|
2
|
+
createAuthContext(
|
|
3
|
+
securityPackage: string,
|
|
4
|
+
targetHost: string | undefined,
|
|
5
|
+
applicationData: Buffer,
|
|
6
|
+
flags: number | undefined
|
|
7
|
+
): number,
|
|
8
|
+
|
|
9
|
+
freeAuthContext(authContextId: number): void,
|
|
10
|
+
|
|
11
|
+
getLogonUserName(): string,
|
|
12
|
+
|
|
13
|
+
createAuthRequest(authContextId: number): Buffer,
|
|
14
|
+
createAuthResponse(authContextId: number, inToken: Buffer): Buffer,
|
|
15
|
+
}
|
package/src/win-sso.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { debug } from "./utils/debug.logger";
|
|
2
2
|
import { PeerCertificate } from "tls";
|
|
3
3
|
import path from "path";
|
|
4
|
+
import { IWinSsoAddon } from "./utils/i.win-sso-addon";
|
|
4
5
|
|
|
5
|
-
let winSsoAddon:
|
|
6
|
+
let winSsoAddon: IWinSsoAddon;
|
|
6
7
|
try {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
7
9
|
winSsoAddon = require("node-gyp-build")(path.join(__dirname, ".."));
|
|
8
10
|
debug("Loaded win-sso native module");
|
|
9
|
-
} catch
|
|
11
|
+
} catch {
|
|
10
12
|
debug("Could not load win-sso native module");
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -23,12 +25,11 @@ export class WinSso {
|
|
|
23
25
|
* Creates an authentication context for SSO.
|
|
24
26
|
* This allocates memory buffers, the freeAuthContext method should be called
|
|
25
27
|
* to free them (on error or after authentication is no longer needed)
|
|
26
|
-
*
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @param {PeerCertificate | undefined} peerCert The certificate of the target server
|
|
28
|
+
* @param securityPackage The name of the security package (NTLM or Negotiate)
|
|
29
|
+
* @param targetHost The FQDN hostname of the target (optional for NTLM, required for Kerberos)
|
|
30
|
+
* @param peerCert The certificate of the target server
|
|
30
31
|
* (optional, for HTTPS channel binding)
|
|
31
|
-
* @param
|
|
32
|
+
* @param flags Flags to set in the authentication context
|
|
32
33
|
* If not set, NTML defaults to no flags, while Negotiate defaults to ISC_REQ_MUTUAL_AUTH | ISC_REQ_SEQUENCE_DETECT
|
|
33
34
|
* (optional, allows customizing security features)
|
|
34
35
|
*/
|
|
@@ -58,8 +59,7 @@ export class WinSso {
|
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* Retrieves the username of the logged in user
|
|
61
|
-
*
|
|
62
|
-
* @returns {string} user name including domain
|
|
62
|
+
* @returns user name including domain
|
|
63
63
|
*/
|
|
64
64
|
static getLogonUserName(): string {
|
|
65
65
|
return winSsoAddon.getLogonUserName();
|
|
@@ -67,13 +67,11 @@ export class WinSso {
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Transforms target TLS certificate into a channel binding application data buffer
|
|
70
|
-
*
|
|
71
|
-
* @
|
|
72
|
-
* @returns {Buffer} Application data buffer
|
|
70
|
+
* @param peerCert Target TLS certificate
|
|
71
|
+
* @returns Application data buffer
|
|
73
72
|
*/
|
|
74
73
|
private getChannelBindingsApplicationData(peerCert: PeerCertificate): Buffer {
|
|
75
|
-
const
|
|
76
|
-
const hash = cert.fingerprint256.replace(/:/g, "");
|
|
74
|
+
const hash = peerCert.fingerprint256.replace(/:/g, "");
|
|
77
75
|
const hashBuf = Buffer.from(hash, "hex");
|
|
78
76
|
const tlsServerEndPoint = "tls-server-end-point:";
|
|
79
77
|
const applicationDataBuffer = Buffer.alloc(
|
|
@@ -95,8 +93,7 @@ export class WinSso {
|
|
|
95
93
|
|
|
96
94
|
/**
|
|
97
95
|
* Creates an authentication request token
|
|
98
|
-
*
|
|
99
|
-
* @returns {Buffer} Raw token buffer
|
|
96
|
+
* @returns Raw token buffer
|
|
100
97
|
*/
|
|
101
98
|
createAuthRequest(): Buffer {
|
|
102
99
|
const token = winSsoAddon.createAuthRequest(this.authContextId);
|
|
@@ -109,8 +106,7 @@ export class WinSso {
|
|
|
109
106
|
|
|
110
107
|
/**
|
|
111
108
|
* Creates an authentication request header
|
|
112
|
-
*
|
|
113
|
-
* @returns {string} The www-authenticate header
|
|
109
|
+
* @returns The www-authenticate header
|
|
114
110
|
*/
|
|
115
111
|
createAuthRequestHeader(): string {
|
|
116
112
|
const header =
|
|
@@ -120,10 +116,9 @@ export class WinSso {
|
|
|
120
116
|
|
|
121
117
|
/**
|
|
122
118
|
* Creates an authentication response token
|
|
123
|
-
*
|
|
124
|
-
* @param {string} inTokenHeader The www-authentication header received from the target
|
|
119
|
+
* @param inTokenHeader The www-authentication header received from the target
|
|
125
120
|
* in response to the authentication request
|
|
126
|
-
* @returns
|
|
121
|
+
* @returns Raw token buffer. May be empty if Negotiate handshake is complete.
|
|
127
122
|
*/
|
|
128
123
|
createAuthResponse(inTokenHeader: string): Buffer {
|
|
129
124
|
debug("Received www-authentication response", inTokenHeader);
|
|
@@ -170,7 +165,6 @@ export class WinSso {
|
|
|
170
165
|
}
|
|
171
166
|
}
|
|
172
167
|
|
|
173
|
-
// eslint-disable-next-line require-jsdoc
|
|
174
168
|
private isNtlmV1(type2message: Buffer): boolean {
|
|
175
169
|
if (type2message.length >= 24) {
|
|
176
170
|
const inTokenFlags = type2message.readInt32BE(20);
|
|
@@ -183,10 +177,9 @@ export class WinSso {
|
|
|
183
177
|
|
|
184
178
|
/**
|
|
185
179
|
* Creates an authentication response header
|
|
186
|
-
*
|
|
187
|
-
* @param {string} inTokenHeader The www-authentication header received from the target
|
|
180
|
+
* @param inTokenHeader The www-authentication header received from the target
|
|
188
181
|
* in response to the authentication request
|
|
189
|
-
* @returns
|
|
182
|
+
* @returns The www-authenticate header. May be an empty string if Negotiate handshake is complete.
|
|
190
183
|
*/
|
|
191
184
|
createAuthResponseHeader(inTokenHeader: string): string {
|
|
192
185
|
const tokenBuffer = this.createAuthResponse(inTokenHeader);
|
|
Binary file
|
|
Binary file
|