@b-jones-rfd/ntlm-handshake 0.1.0 → 1.0.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/README.md +7 -0
- package/dist/{errors-Bc9WxpK5.d.ts → errors-BFXajDan.d.ts} +6 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{messages-DkYBhV5J.js → messages-CTfd27DI.js} +6 -4
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -219,6 +219,13 @@ Full generated reference:
|
|
|
219
219
|
| `createAuthenticateMessage` | the challenge, credentials | `Uint8Array` | When the server offered only NTLMv1 |
|
|
220
220
|
| `toAuthorizationHeader` | message bytes | `NTLM <base64>` | No |
|
|
221
221
|
|
|
222
|
+
## Migrating to 1.0
|
|
223
|
+
|
|
224
|
+
There is nothing to change: 1.0 adds and removes nothing. It marks the API
|
|
225
|
+
as stable. From 1.0, releases follow SemVer strictly, and anything removed or
|
|
226
|
+
changed is first deprecated in a minor release that names the major removing
|
|
227
|
+
it.
|
|
228
|
+
|
|
222
229
|
## Contributing
|
|
223
230
|
|
|
224
231
|
This is a personal project maintained for my own work and is not accepting
|
|
@@ -287,10 +287,12 @@ type NtlmConnection = {
|
|
|
287
287
|
testConnection: TestConnectionAction;
|
|
288
288
|
};
|
|
289
289
|
/**
|
|
290
|
-
*
|
|
291
|
-
* NTLM,
|
|
292
|
-
*
|
|
293
|
-
*
|
|
290
|
+
* Thrown by the `./protocol` functions on malformed input: a header with no
|
|
291
|
+
* NTLM challenge, bytes that are not a type 2 message, or a server that
|
|
292
|
+
* offered only NTLMv1. The connection's actions never throw it: they turn the
|
|
293
|
+
* same problems into a `PROTOCOL` {@link Failure}. It is exported from both
|
|
294
|
+
* `@b-jones-rfd/ntlm-handshake` and `@b-jones-rfd/ntlm-handshake/protocol`,
|
|
295
|
+
* as one class, so `instanceof NtlmError` works whichever you import.
|
|
294
296
|
*/
|
|
295
297
|
declare class NtlmError extends Error {
|
|
296
298
|
readonly name = "NtlmError";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FailureCode, c as NtlmCredentials, d as RequestOptions, f as Result, g as TestConnectionOptions, h as TestConnectionAction, i as Failure, l as NtlmResponse, m as Success, n as ActionFactory, o as NtlmConnection, p as RetryOptions, r as ConnectionContext, s as NtlmConnectionOptions, t as NtlmError, u as RequestAction } from "./errors-
|
|
1
|
+
import { a as FailureCode, c as NtlmCredentials, d as RequestOptions, f as Result, g as TestConnectionOptions, h as TestConnectionAction, i as Failure, l as NtlmResponse, m as Success, n as ActionFactory, o as NtlmConnection, p as RetryOptions, r as ConnectionContext, s as NtlmConnectionOptions, t as NtlmError, u as RequestAction } from "./errors-BFXajDan.js";
|
|
2
2
|
/**
|
|
3
3
|
* Checks the shape of connection options and throws a `TypeError` naming the
|
|
4
4
|
* first bad option and the value it got (never the password's). Catches a
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as toAuthorizationHeader, c as NtlmError, i as parseChallengeMessage, l as TimeoutError, n as createNegotiateMessage, o as HttpStatusError, r as extractNtlmChallenge, s as InvalidRequestError, t as createAuthenticateMessage, u as toFailure } from "./messages-
|
|
1
|
+
import { a as toAuthorizationHeader, c as NtlmError, i as parseChallengeMessage, l as TimeoutError, n as createNegotiateMessage, o as HttpStatusError, r as extractNtlmChallenge, s as InvalidRequestError, t as createAuthenticateMessage, u as toFailure } from "./messages-CTfd27DI.js";
|
|
2
2
|
import http from "node:http";
|
|
3
3
|
import https from "node:https";
|
|
4
4
|
import { Readable } from "node:stream";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createHmac, randomBytes } from "node:crypto";
|
|
2
2
|
// src/errors.ts
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* NTLM,
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Thrown by the `./protocol` functions on malformed input: a header with no
|
|
5
|
+
* NTLM challenge, bytes that are not a type 2 message, or a server that
|
|
6
|
+
* offered only NTLMv1. The connection's actions never throw it: they turn the
|
|
7
|
+
* same problems into a `PROTOCOL` {@link Failure}. It is exported from both
|
|
8
|
+
* `@b-jones-rfd/ntlm-handshake` and `@b-jones-rfd/ntlm-handshake/protocol`,
|
|
9
|
+
* as one class, so `instanceof NtlmError` works whichever you import.
|
|
8
10
|
*/
|
|
9
11
|
var NtlmError = class extends Error {
|
|
10
12
|
name = "NtlmError";
|
package/dist/protocol.d.ts
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
* @module
|
|
29
29
|
*/
|
|
30
|
-
import { c as NtlmCredentials, t as NtlmError } from "./errors-
|
|
30
|
+
import { c as NtlmCredentials, t as NtlmError } from "./errors-BFXajDan.js";
|
|
31
31
|
/** The parsed CHALLENGE_MESSAGE (type 2) a server sends with its 401. */
|
|
32
32
|
type NtlmChallenge = {
|
|
33
33
|
/** Negotiate flags the server chose. */
|
package/dist/protocol.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as NtlmError, t as createAuthenticateMessage, n as createNegotiateMessage, r as extractNtlmChallenge, i as parseChallengeMessage, a as toAuthorizationHeader } from "./messages-
|
|
1
|
+
export { c as NtlmError, t as createAuthenticateMessage, n as createNegotiateMessage, r as extractNtlmChallenge, i as parseChallengeMessage, a as toAuthorizationHeader } from "./messages-CTfd27DI.js";
|