@azure/msal-node 3.7.2 → 3.7.3
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/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/NodeStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/client/ClientApplication.mjs +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientCredentialClient.mjs +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/DeviceCodeClient.mjs +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
- package/dist/client/OnBehalfOfClient.mjs +1 -1
- package/dist/client/PublicClientApplication.d.ts.map +1 -1
- package/dist/client/PublicClientApplication.mjs +9 -3
- package/dist/client/PublicClientApplication.mjs.map +1 -1
- package/dist/client/UsernamePasswordClient.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/NodeAuthError.d.ts +8 -0
- package/dist/error/NodeAuthError.d.ts.map +1 -1
- package/dist/error/NodeAuthError.mjs +11 -1
- package/dist/error/NodeAuthError.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.mjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/LoopbackClient.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/request/InteractiveRequest.d.ts +1 -1
- package/dist/request/InteractiveRequest.d.ts.map +1 -1
- package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
- package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
- package/dist/retry/ImdsRetryPolicy.mjs +1 -1
- package/dist/retry/LinearRetryStrategy.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/NetworkUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/lib/msal-node.cjs +78 -62
- package/lib/msal-node.cjs.map +1 -1
- package/lib/types/client/PublicClientApplication.d.ts.map +1 -1
- package/lib/types/error/NodeAuthError.d.ts +8 -0
- package/lib/types/error/NodeAuthError.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/request/InteractiveRequest.d.ts +1 -1
- package/lib/types/request/InteractiveRequest.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/PublicClientApplication.ts +9 -2
- package/src/error/NodeAuthError.ts +14 -0
- package/src/packageMetadata.ts +1 -1
- package/src/request/InteractiveRequest.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAUpB,WAAW,EAKd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D;;;;GAIG;AACH,qBAAa,uBACT,SAAQ,iBACR,YAAW,wBAAwB;IAEnC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAoBxC;;;;;;;;OAQG;IACU,wBAAwB,CACjC,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAyCvC;;OAEG;IACG,uBAAuB,CACzB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,oBAAoB,EAUpB,WAAW,EAKd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D;;;;GAIG;AACH,qBAAa,uBACT,SAAQ,iBACR,YAAW,wBAAwB;IAEnC,OAAO,CAAC,kBAAkB,CAAC,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAoBxC;;;;;;;;OAQG;IACU,wBAAwB,CACjC,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAyCvC;;OAEG;IACG,uBAAuB,CACzB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IAmGhC;;;;OAIG;IACG,kBAAkB,CACpB,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,oBAAoB,CAAC;IA8BhC;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBrD;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAY9C;;;;OAIG;YACW,kBAAkB;CAsCnC"}
|
|
@@ -35,6 +35,10 @@ export declare const NodeAuthErrorMessage: {
|
|
|
35
35
|
code: string;
|
|
36
36
|
desc: string;
|
|
37
37
|
};
|
|
38
|
+
redirectUriNotSupported: {
|
|
39
|
+
code: string;
|
|
40
|
+
desc: string;
|
|
41
|
+
};
|
|
38
42
|
};
|
|
39
43
|
export declare class NodeAuthError extends AuthError {
|
|
40
44
|
constructor(errorCode: string, errorMessage?: string);
|
|
@@ -70,5 +74,9 @@ export declare class NodeAuthError extends AuthError {
|
|
|
70
74
|
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
71
75
|
*/
|
|
72
76
|
static createThumbprintMissingError(): NodeAuthError;
|
|
77
|
+
/**
|
|
78
|
+
* Creates an error thrown when redirectUri is provided in an unsupported scenario
|
|
79
|
+
*/
|
|
80
|
+
static createRedirectUriNotSupportedError(): NodeAuthError;
|
|
73
81
|
}
|
|
74
82
|
//# sourceMappingURL=NodeAuthError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/NodeAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"NodeAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/NodeAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqChC,CAAC;AAEF,qBAAa,aAAc,SAAQ,SAAS;gBAC5B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACH,MAAM,CAAC,qCAAqC,IAAI,aAAa;IAO7D;;OAEG;IACH,MAAM,CAAC,kCAAkC,IAAI,aAAa;IAO1D;;OAEG;IACH,MAAM,CAAC,+BAA+B,IAAI,aAAa;IAOvD;;OAEG;IACH,MAAM,CAAC,iCAAiC,IAAI,aAAa;IAOzD;;OAEG;IACH,MAAM,CAAC,sCAAsC,IAAI,aAAa;IAO9D;;OAEG;IACH,MAAM,CAAC,gCAAgC,IAAI,aAAa;IAOxD;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,aAAa;IAOhD;;OAEG;IACH,MAAM,CAAC,4BAA4B,IAAI,aAAa;IAOpD;;OAEG;IACH,MAAM,CAAC,kCAAkC,IAAI,aAAa;CAM7D"}
|
|
@@ -13,7 +13,7 @@ import { ILoopbackClient } from "../network/ILoopbackClient.js";
|
|
|
13
13
|
* - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
|
-
export type InteractiveRequest = Partial<Omit<CommonAuthorizationUrlRequest, "scopes" | "
|
|
16
|
+
export type InteractiveRequest = Partial<Omit<CommonAuthorizationUrlRequest, "scopes" | "requestedClaimsHash" | "storeInCache">> & {
|
|
17
17
|
openBrowser: (url: string) => Promise<void>;
|
|
18
18
|
scopes?: Array<string>;
|
|
19
19
|
successTemplate?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../../../src/request/InteractiveRequest.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,IAAI,CACA,6BAA6B,EAC7B,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"InteractiveRequest.d.ts","sourceRoot":"","sources":["../../../src/request/InteractiveRequest.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,IAAI,CACA,6BAA6B,EAC7B,QAAQ,GAAG,qBAAqB,GAAG,cAAc,CACpD,CACJ,GAAG;IACA,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;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,eAAe,CAAC;CACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -163,7 +163,7 @@ export class PublicClientApplication
|
|
|
163
163
|
...remainingProperties,
|
|
164
164
|
clientId: this.config.auth.clientId,
|
|
165
165
|
scopes: request.scopes || OIDC_DEFAULT_SCOPES,
|
|
166
|
-
redirectUri:
|
|
166
|
+
redirectUri: request.redirectUri || "",
|
|
167
167
|
authority: request.authority || this.config.auth.authority,
|
|
168
168
|
correlationId: correlationId,
|
|
169
169
|
extraParameters: {
|
|
@@ -179,6 +179,9 @@ export class PublicClientApplication
|
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
if (request.redirectUri) {
|
|
183
|
+
throw NodeAuthError.createRedirectUriNotSupportedError();
|
|
184
|
+
}
|
|
182
185
|
const { verifier, challenge } =
|
|
183
186
|
await this.cryptoProvider.generatePkceCodes();
|
|
184
187
|
|
|
@@ -258,7 +261,7 @@ export class PublicClientApplication
|
|
|
258
261
|
...request,
|
|
259
262
|
clientId: this.config.auth.clientId,
|
|
260
263
|
scopes: request.scopes || OIDC_DEFAULT_SCOPES,
|
|
261
|
-
redirectUri:
|
|
264
|
+
redirectUri: request.redirectUri || "",
|
|
262
265
|
authority: request.authority || this.config.auth.authority,
|
|
263
266
|
correlationId: correlationId,
|
|
264
267
|
extraParameters: {
|
|
@@ -271,6 +274,10 @@ export class PublicClientApplication
|
|
|
271
274
|
return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest);
|
|
272
275
|
}
|
|
273
276
|
|
|
277
|
+
if (request.redirectUri) {
|
|
278
|
+
throw NodeAuthError.createRedirectUriNotSupportedError();
|
|
279
|
+
}
|
|
280
|
+
|
|
274
281
|
return super.acquireTokenSilent(request);
|
|
275
282
|
}
|
|
276
283
|
|
|
@@ -41,6 +41,10 @@ export const NodeAuthErrorMessage = {
|
|
|
41
41
|
code: "thumbprint_missing_from_client_certificate",
|
|
42
42
|
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.",
|
|
43
43
|
},
|
|
44
|
+
redirectUriNotSupported: {
|
|
45
|
+
code: "redirect_uri_not_supported",
|
|
46
|
+
desc: "RedirectUri is not supported in this scenario. Please remove redirectUri from the request.",
|
|
47
|
+
},
|
|
44
48
|
};
|
|
45
49
|
|
|
46
50
|
export class NodeAuthError extends AuthError {
|
|
@@ -128,4 +132,14 @@ export class NodeAuthError extends AuthError {
|
|
|
128
132
|
NodeAuthErrorMessage.thumbprintMissing.desc
|
|
129
133
|
);
|
|
130
134
|
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Creates an error thrown when redirectUri is provided in an unsupported scenario
|
|
138
|
+
*/
|
|
139
|
+
static createRedirectUriNotSupportedError(): NodeAuthError {
|
|
140
|
+
return new NodeAuthError(
|
|
141
|
+
NodeAuthErrorMessage.redirectUriNotSupported.code,
|
|
142
|
+
NodeAuthErrorMessage.redirectUriNotSupported.desc
|
|
143
|
+
);
|
|
144
|
+
}
|
|
131
145
|
}
|
package/src/packageMetadata.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { ILoopbackClient } from "../network/ILoopbackClient.js";
|
|
|
20
20
|
export type InteractiveRequest = Partial<
|
|
21
21
|
Omit<
|
|
22
22
|
CommonAuthorizationUrlRequest,
|
|
23
|
-
"scopes" | "
|
|
23
|
+
"scopes" | "requestedClaimsHash" | "storeInCache"
|
|
24
24
|
>
|
|
25
25
|
> & {
|
|
26
26
|
openBrowser: (url: string) => Promise<void>;
|