@azure/msal-node 1.12.0 → 1.14.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/dist/client/ClientApplication.d.ts +13 -2
- package/dist/client/ClientApplication.d.ts.map +1 -1
- package/dist/client/IConfidentialClientApplication.d.ts +1 -1
- package/dist/client/IConfidentialClientApplication.d.ts.map +1 -1
- package/dist/client/IPublicClientApplication.d.ts +4 -1
- package/dist/client/IPublicClientApplication.d.ts.map +1 -1
- package/dist/client/PublicClientApplication.d.ts +5 -0
- package/dist/client/PublicClientApplication.d.ts.map +1 -1
- package/dist/error/NodeAuthError.d.ts +66 -0
- package/dist/error/NodeAuthError.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/msal-node.cjs.development.js +295 -5
- package/dist/msal-node.cjs.development.js.map +1 -1
- package/dist/msal-node.cjs.production.min.js +1 -1
- package/dist/msal-node.cjs.production.min.js.map +1 -1
- package/dist/msal-node.esm.js +294 -5
- package/dist/msal-node.esm.js.map +1 -1
- package/dist/network/LoopbackClient.d.ts +21 -0
- package/dist/network/LoopbackClient.d.ts.map +1 -0
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts +2 -0
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/InteractiveRequest.d.ts +8 -0
- package/dist/request/InteractiveRequest.d.ts.map +1 -0
- package/dist/utils/Constants.d.ts +10 -0
- package/dist/utils/Constants.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
|
|
2
|
+
export declare class LoopbackClient {
|
|
3
|
+
private server;
|
|
4
|
+
/**
|
|
5
|
+
* Spins up a loopback server which returns the server response when the localhost redirectUri is hit
|
|
6
|
+
* @param successTemplate
|
|
7
|
+
* @param errorTemplate
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the port that the loopback server is running on
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
getRedirectUri(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Close the loopback server
|
|
18
|
+
*/
|
|
19
|
+
closeServer(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=LoopbackClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoopbackClient.d.ts","sourceRoot":"","sources":["../src/network/LoopbackClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgC,+BAA+B,EAAa,MAAM,oBAAoB,CAAC;AAK9G,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;OAKG;IACG,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,+BAA+B,CAAC;IA+CnH;;;OAGG;IACH,cAAc,IAAI,MAAM;IAgBxB;;OAEG;IACH,WAAW,IAAI,IAAI;CAKtB"}
|
|
@@ -10,11 +10,13 @@ import { CommonAuthorizationCodeRequest } from "@azure/msal-common";
|
|
|
10
10
|
* - tokenQueryParameters - String to string map of custom query parameters added to the /token call
|
|
11
11
|
* - code - The authorization_code that the user acquired in the first leg of the flow.
|
|
12
12
|
* - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636
|
|
13
|
+
* - state - Unique GUID generated by the user that is cached by the user and sent to the server during the first leg of the flow. This string is sent back by the server with the authorization code. The user cached state is then compared with the state received from the server to mitigate the risk of CSRF attacks. See https://datatracker.ietf.org/doc/html/rfc6819#section-3.6.
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
16
|
export declare type AuthorizationCodeRequest = Partial<Omit<CommonAuthorizationCodeRequest, "scopes" | "redirectUri" | "code" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
|
|
16
17
|
scopes: Array<string>;
|
|
17
18
|
redirectUri: string;
|
|
18
19
|
code: string;
|
|
20
|
+
state?: string;
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=AuthorizationCodeRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../src/request/AuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE
|
|
1
|
+
{"version":3,"file":"AuthorizationCodeRequest.d.ts","sourceRoot":"","sources":["../src/request/AuthorizationCodeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,oBAAY,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,QAAQ,GAAC,aAAa,GAAC,MAAM,GAAC,sBAAsB,GAAC,uBAAuB,GAAC,oBAAoB,GAAC,qBAAqB,CAAC,CAAC,GAAG;IAC5M,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest";
|
|
2
|
+
export declare type InteractiveRequest = Pick<AuthorizationUrlRequest, "authority" | "correlationId" | "claims" | "azureCloudOptions" | "account" | "extraQueryParameters" | "tokenQueryParameters" | "extraScopesToConsent" | "loginHint" | "prompt"> & {
|
|
3
|
+
openBrowser: (url: string) => Promise<void>;
|
|
4
|
+
scopes?: Array<string>;
|
|
5
|
+
successTemplate?: string;
|
|
6
|
+
errorTemplate?: string;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=InteractiveRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../src/request/InteractiveRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,oBAAY,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAC,eAAe,GAAC,QAAQ,GAAC,mBAAmB,GAAC,SAAS,GAAC,sBAAsB,GAAC,sBAAsB,GAAC,sBAAsB,GAAC,WAAW,GAAC,QAAQ,CAAC,GAAG;IAC3N,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -5,6 +5,10 @@ export declare enum HttpMethod {
|
|
|
5
5
|
GET = "get",
|
|
6
6
|
POST = "post"
|
|
7
7
|
}
|
|
8
|
+
export declare enum HttpStatus {
|
|
9
|
+
OK = 200,
|
|
10
|
+
REDIRECT = 302
|
|
11
|
+
}
|
|
8
12
|
/**
|
|
9
13
|
* Constants used for region discovery
|
|
10
14
|
*/
|
|
@@ -39,6 +43,8 @@ export declare const Constants: {
|
|
|
39
43
|
MSAL_SKU: string;
|
|
40
44
|
JWT_BEARER_ASSERTION_TYPE: string;
|
|
41
45
|
AUTHORIZATION_PENDING: string;
|
|
46
|
+
HTTP_PROTOCOL: string;
|
|
47
|
+
LOCALHOST: string;
|
|
42
48
|
};
|
|
43
49
|
/**
|
|
44
50
|
* API Codes for Telemetry purposes.
|
|
@@ -70,4 +76,8 @@ export declare const JwtConstants: {
|
|
|
70
76
|
NOT_BEFORE: string;
|
|
71
77
|
JWT_ID: string;
|
|
72
78
|
};
|
|
79
|
+
export declare const LOOPBACK_SERVER_CONSTANTS: {
|
|
80
|
+
INTERVAL_MS: number;
|
|
81
|
+
TIMEOUT_MS: number;
|
|
82
|
+
};
|
|
73
83
|
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../src/utils/Constants.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,UAAU;IAClB,GAAG,QAAQ;IACX,IAAI,SAAS;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,gBAAgB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,IAAI;;CAEhB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO;;CAGnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK;;;CAGjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../src/utils/Constants.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,UAAU;IAClB,GAAG,QAAQ;IACX,IAAI,SAAS;CAChB;AAED,oBAAY,UAAU;IAClB,EAAE,MAAM;IACR,QAAQ,MAAM;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,gBAAgB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,IAAI;;CAEhB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO;;CAGnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK;;;CAGjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AAEF;;;;;;GAMG;AACH,oBAAY,KAAK;IACb,kBAAkB,KAAK;IACvB,8BAA8B,MAAM;IACpC,wBAAwB,MAAM;IAC9B,8BAA8B,MAAM;IACpC,kBAAkB,MAAM;IACxB,0BAA0B,MAAM;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAWxB,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/msal-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Microsoft",
|
|
6
6
|
"email": "nugetaad@microsoft.com",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"yargs": "^17.3.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@azure/msal-common": "^7.
|
|
61
|
+
"@azure/msal-common": "^7.4.1",
|
|
62
62
|
"jsonwebtoken": "^8.5.1",
|
|
63
63
|
"uuid": "^8.3.0"
|
|
64
64
|
},
|