@azure/msal-node 2.0.0-alpha.1 → 2.0.0-beta.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.
Files changed (112) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +182 -182
  3. package/dist/cache/ITokenCache.d.ts +15 -15
  4. package/dist/cache/NodeStorage.d.ts +182 -182
  5. package/dist/cache/NodeStorage.esm.js +401 -401
  6. package/dist/cache/NodeStorage.js +401 -401
  7. package/dist/cache/TokenCache.d.ts +90 -90
  8. package/dist/cache/TokenCache.esm.js +269 -269
  9. package/dist/cache/TokenCache.js +269 -269
  10. package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
  11. package/dist/cache/distributed/DistributedCachePlugin.esm.js +26 -26
  12. package/dist/cache/distributed/DistributedCachePlugin.js +26 -26
  13. package/dist/cache/distributed/ICacheClient.d.ts +17 -17
  14. package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
  15. package/dist/cache/serializer/Deserializer.d.ts +42 -42
  16. package/dist/cache/serializer/Deserializer.esm.js +175 -175
  17. package/dist/cache/serializer/Deserializer.js +175 -175
  18. package/dist/cache/serializer/Serializer.d.ts +39 -39
  19. package/dist/cache/serializer/Serializer.esm.js +134 -134
  20. package/dist/cache/serializer/Serializer.js +134 -134
  21. package/dist/cache/serializer/SerializerTypes.d.ts +101 -101
  22. package/dist/client/ClientApplication.d.ts +142 -142
  23. package/dist/client/ClientApplication.esm.js +327 -327
  24. package/dist/client/ClientApplication.js +327 -327
  25. package/dist/client/ClientAssertion.d.ts +46 -46
  26. package/dist/client/ClientAssertion.esm.js +116 -116
  27. package/dist/client/ClientAssertion.js +116 -116
  28. package/dist/client/ClientCredentialClient.d.ts +33 -33
  29. package/dist/client/ClientCredentialClient.esm.js +157 -157
  30. package/dist/client/ClientCredentialClient.js +157 -157
  31. package/dist/client/ConfidentialClientApplication.d.ts +58 -58
  32. package/dist/client/ConfidentialClientApplication.esm.js +163 -163
  33. package/dist/client/ConfidentialClientApplication.js +163 -163
  34. package/dist/client/DeviceCodeClient.d.ts +53 -53
  35. package/dist/client/DeviceCodeClient.esm.js +207 -207
  36. package/dist/client/DeviceCodeClient.js +207 -207
  37. package/dist/client/IConfidentialClientApplication.d.ts +39 -39
  38. package/dist/client/IPublicClientApplication.d.ts +42 -42
  39. package/dist/client/OnBehalfOfClient.d.ts +47 -47
  40. package/dist/client/OnBehalfOfClient.esm.js +204 -204
  41. package/dist/client/OnBehalfOfClient.js +204 -204
  42. package/dist/client/PublicClientApplication.d.ts +65 -65
  43. package/dist/client/PublicClientApplication.esm.js +175 -175
  44. package/dist/client/PublicClientApplication.js +175 -175
  45. package/dist/client/UsernamePasswordClient.d.ts +25 -25
  46. package/dist/client/UsernamePasswordClient.esm.js +102 -102
  47. package/dist/client/UsernamePasswordClient.js +102 -102
  48. package/dist/config/Configuration.d.ts +105 -105
  49. package/dist/config/Configuration.esm.js +70 -70
  50. package/dist/config/Configuration.js +70 -70
  51. package/dist/crypto/CryptoProvider.d.ts +52 -52
  52. package/dist/crypto/CryptoProvider.esm.js +75 -75
  53. package/dist/crypto/CryptoProvider.js +75 -75
  54. package/dist/crypto/GuidGenerator.d.ts +14 -14
  55. package/dist/crypto/GuidGenerator.esm.js +22 -22
  56. package/dist/crypto/GuidGenerator.js +22 -22
  57. package/dist/crypto/HashUtils.d.ts +8 -8
  58. package/dist/crypto/HashUtils.esm.js +13 -13
  59. package/dist/crypto/HashUtils.js +13 -13
  60. package/dist/crypto/PkceGenerator.d.ts +22 -22
  61. package/dist/crypto/PkceGenerator.esm.js +49 -49
  62. package/dist/crypto/PkceGenerator.js +49 -49
  63. package/dist/error/NodeAuthError.d.ts +65 -65
  64. package/dist/error/NodeAuthError.esm.js +85 -85
  65. package/dist/error/NodeAuthError.js +85 -85
  66. package/dist/index.d.ts +41 -41
  67. package/dist/index.esm.js +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/internals.d.ts +6 -6
  70. package/dist/internals.esm.js +4 -4
  71. package/dist/internals.js +4 -4
  72. package/dist/network/HttpClient.d.ts +25 -25
  73. package/dist/network/HttpClient.esm.js +276 -276
  74. package/dist/network/HttpClient.js +276 -276
  75. package/dist/network/ILoopbackClient.d.ts +10 -10
  76. package/dist/network/LoopbackClient.d.ts +21 -21
  77. package/dist/network/LoopbackClient.esm.js +84 -84
  78. package/dist/network/LoopbackClient.js +84 -84
  79. package/dist/packageMetadata.d.ts +2 -2
  80. package/dist/packageMetadata.d.ts.map +1 -1
  81. package/dist/packageMetadata.esm.js +4 -4
  82. package/dist/packageMetadata.js +4 -4
  83. package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
  84. package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
  85. package/dist/request/ClientCredentialRequest.d.ts +14 -15
  86. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  87. package/dist/request/DeviceCodeRequest.d.ts +15 -15
  88. package/dist/request/InteractiveRequest.d.ts +22 -22
  89. package/dist/request/OnBehalfOfRequest.d.ts +14 -14
  90. package/dist/request/RefreshTokenRequest.d.ts +17 -17
  91. package/dist/request/SignOutRequest.d.ts +5 -5
  92. package/dist/request/SilentFlowRequest.d.ts +16 -16
  93. package/dist/request/UsernamePasswordRequest.d.ts +19 -19
  94. package/dist/utils/Constants.d.ts +96 -92
  95. package/dist/utils/Constants.d.ts.map +1 -1
  96. package/dist/utils/Constants.esm.js +89 -93
  97. package/dist/utils/Constants.esm.js.map +1 -1
  98. package/dist/utils/Constants.js +93 -93
  99. package/dist/utils/Constants.js.map +1 -1
  100. package/dist/utils/EncodingUtils.d.ts +26 -26
  101. package/dist/utils/EncodingUtils.esm.js +44 -44
  102. package/dist/utils/EncodingUtils.js +44 -44
  103. package/dist/utils/NetworkUtils.d.ts +5 -5
  104. package/dist/utils/NetworkUtils.esm.js +38 -38
  105. package/dist/utils/NetworkUtils.js +38 -38
  106. package/package.json +77 -73
  107. package/dist/msal-node.cjs.development.js +0 -2705
  108. package/dist/msal-node.cjs.development.js.map +0 -1
  109. package/dist/msal-node.cjs.production.min.js +0 -2
  110. package/dist/msal-node.cjs.production.min.js.map +0 -1
  111. package/dist/msal-node.esm.js +0 -2594
  112. package/dist/msal-node.esm.js.map +0 -1
@@ -1,23 +1,23 @@
1
- /// <reference types="node" />
2
- import { ILoopbackClient } from "../network/ILoopbackClient";
3
- import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest";
4
- /**
5
- * Request object passed by user to configure acquireTokenInteractive API
6
- *
7
- * - openBrowser - Function to open a browser instance on user's system.
8
- * - scopes - Array of scopes the application is requesting access to.
9
- * - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition.
10
- * - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure.
11
- * - windowHandle - Used in native broker flows to properly parent the native broker window
12
- * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
13
- * @public
14
- */
15
- export type InteractiveRequest = Pick<AuthorizationUrlRequest, "authority" | "correlationId" | "claims" | "azureCloudOptions" | "account" | "extraQueryParameters" | "tokenQueryParameters" | "extraScopesToConsent" | "loginHint" | "prompt"> & {
16
- openBrowser: (url: string) => Promise<void>;
17
- scopes?: Array<string>;
18
- successTemplate?: string;
19
- errorTemplate?: string;
20
- windowHandle?: Buffer;
21
- loopbackClient?: ILoopbackClient;
22
- };
1
+ /// <reference types="node" />
2
+ import { ILoopbackClient } from "../network/ILoopbackClient";
3
+ import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest";
4
+ /**
5
+ * Request object passed by user to configure acquireTokenInteractive API
6
+ *
7
+ * - openBrowser - Function to open a browser instance on user's system.
8
+ * - scopes - Array of scopes the application is requesting access to.
9
+ * - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition.
10
+ * - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure.
11
+ * - windowHandle - Used in native broker flows to properly parent the native broker window
12
+ * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
13
+ * @public
14
+ */
15
+ export type InteractiveRequest = Pick<AuthorizationUrlRequest, "authority" | "correlationId" | "claims" | "azureCloudOptions" | "account" | "extraQueryParameters" | "tokenQueryParameters" | "extraScopesToConsent" | "loginHint" | "prompt"> & {
16
+ openBrowser: (url: string) => Promise<void>;
17
+ scopes?: Array<string>;
18
+ successTemplate?: string;
19
+ errorTemplate?: string;
20
+ windowHandle?: Buffer;
21
+ loopbackClient?: ILoopbackClient;
22
+ };
23
23
  //# sourceMappingURL=InteractiveRequest.d.ts.map
@@ -1,15 +1,15 @@
1
- import { CommonOnBehalfOfRequest } from "@azure/msal-common";
2
- /**
3
- * - scopes - Array of scopes the application is requesting access to.
4
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
5
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
6
- * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
7
- * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
8
- * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
9
- * @public
10
- */
11
- export type OnBehalfOfRequest = Partial<Omit<CommonOnBehalfOfRequest, "oboAssertion" | "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
12
- oboAssertion: string;
13
- scopes: Array<string>;
14
- };
1
+ import { CommonOnBehalfOfRequest } from "@azure/msal-common";
2
+ /**
3
+ * - scopes - Array of scopes the application is requesting access to.
4
+ * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
5
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
6
+ * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
7
+ * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
8
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
9
+ * @public
10
+ */
11
+ export type OnBehalfOfRequest = Partial<Omit<CommonOnBehalfOfRequest, "oboAssertion" | "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
12
+ oboAssertion: string;
13
+ scopes: Array<string>;
14
+ };
15
15
  //# sourceMappingURL=OnBehalfOfRequest.d.ts.map
@@ -1,18 +1,18 @@
1
- import { CommonRefreshTokenRequest } from "@azure/msal-common";
2
- /**
3
- * CommonRefreshTokenRequest
4
- * - scopes - Array of scopes the application is requesting access to.
5
- * - claims - A stringified claims request which will be added to all /authorize and /token calls
6
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
7
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
8
- * - refreshToken - A refresh token returned from a previous request to the Identity provider.
9
- * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
10
- * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
11
- * @public
12
- */
13
- export type RefreshTokenRequest = Partial<Omit<CommonRefreshTokenRequest, "scopes" | "refreshToken" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
14
- scopes: Array<string>;
15
- refreshToken: string;
16
- forceCache?: boolean;
17
- };
1
+ import { CommonRefreshTokenRequest } from "@azure/msal-common";
2
+ /**
3
+ * CommonRefreshTokenRequest
4
+ * - scopes - Array of scopes the application is requesting access to.
5
+ * - claims - A stringified claims request which will be added to all /authorize and /token calls
6
+ * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
7
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
8
+ * - refreshToken - A refresh token returned from a previous request to the Identity provider.
9
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
10
+ * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
11
+ * @public
12
+ */
13
+ export type RefreshTokenRequest = Partial<Omit<CommonRefreshTokenRequest, "scopes" | "refreshToken" | "authenticationScheme" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
14
+ scopes: Array<string>;
15
+ refreshToken: string;
16
+ forceCache?: boolean;
17
+ };
18
18
  //# sourceMappingURL=RefreshTokenRequest.d.ts.map
@@ -1,6 +1,6 @@
1
- import { AccountInfo } from "@azure/msal-common";
2
- export type SignOutRequest = {
3
- account: AccountInfo;
4
- correlationId?: string;
5
- };
1
+ import { AccountInfo } from "@azure/msal-common";
2
+ export type SignOutRequest = {
3
+ account: AccountInfo;
4
+ correlationId?: string;
5
+ };
6
6
  //# sourceMappingURL=SignOutRequest.d.ts.map
@@ -1,17 +1,17 @@
1
- import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common";
2
- /**
3
- * SilentFlow parameters passed by the user to retrieve credentials silently
4
- * - scopes - Array of scopes the application is requesting access to.
5
- * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
6
- * - authority - Url of the authority which the application acquires tokens from.
7
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
8
- * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
9
- * - account - Account entity to lookup the credentials.
10
- * - forceRefresh - Forces silent requests to make network calls if true.
11
- * @public
12
- */
13
- export type SilentFlowRequest = Partial<Omit<CommonSilentFlowRequest, "account" | "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
14
- account: AccountInfo;
15
- scopes: Array<string>;
16
- };
1
+ import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common";
2
+ /**
3
+ * SilentFlow parameters passed by the user to retrieve credentials silently
4
+ * - scopes - Array of scopes the application is requesting access to.
5
+ * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
6
+ * - authority - Url of the authority which the application acquires tokens from.
7
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
8
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
9
+ * - account - Account entity to lookup the credentials.
10
+ * - forceRefresh - Forces silent requests to make network calls if true.
11
+ * @public
12
+ */
13
+ export type SilentFlowRequest = Partial<Omit<CommonSilentFlowRequest, "account" | "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "requestedClaimsHash">> & {
14
+ account: AccountInfo;
15
+ scopes: Array<string>;
16
+ };
17
17
  //# sourceMappingURL=SilentFlowRequest.d.ts.map
@@ -1,20 +1,20 @@
1
- import { CommonUsernamePasswordRequest } from "@azure/msal-common";
2
- /**
3
- * UsernamePassword parameters passed by the user to retrieve credentials
4
- * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing.
5
- *
6
- * - scopes - Array of scopes the application is requesting access to.
7
- * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
8
- * - authority - Url of the authority which the application acquires tokens from.
9
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
10
- * - username - username of the client
11
- * - password - credentials
12
- * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
13
- * @public
14
- */
15
- export type UsernamePasswordRequest = Partial<Omit<CommonUsernamePasswordRequest, "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "username" | "password" | "requestedClaimsHash">> & {
16
- scopes: Array<string>;
17
- username: string;
18
- password: string;
19
- };
1
+ import { CommonUsernamePasswordRequest } from "@azure/msal-common";
2
+ /**
3
+ * UsernamePassword parameters passed by the user to retrieve credentials
4
+ * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing.
5
+ *
6
+ * - scopes - Array of scopes the application is requesting access to.
7
+ * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
8
+ * - authority - Url of the authority which the application acquires tokens from.
9
+ * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
10
+ * - username - username of the client
11
+ * - password - credentials
12
+ * - tokenQueryParameters - String to string map of custom query parameters added to the /token call
13
+ * @public
14
+ */
15
+ export type UsernamePasswordRequest = Partial<Omit<CommonUsernamePasswordRequest, "scopes" | "resourceRequestMethod" | "resourceRequestUri" | "username" | "password" | "requestedClaimsHash">> & {
16
+ scopes: Array<string>;
17
+ username: string;
18
+ password: string;
19
+ };
20
20
  //# sourceMappingURL=UsernamePasswordRequest.d.ts.map
@@ -1,93 +1,97 @@
1
- /**
2
- * http methods
3
- */
4
- export declare enum HttpMethod {
5
- GET = "get",
6
- POST = "post"
7
- }
8
- export declare enum HttpStatus {
9
- SUCCESS_RANGE_START = 200,
10
- SUCCESS_RANGE_END = 299,
11
- REDIRECT = 302,
12
- CLIENT_ERROR_RANGE_START = 400,
13
- CLIENT_ERROR_RANGE_END = 499,
14
- SERVER_ERROR_RANGE_START = 500,
15
- SERVER_ERROR_RANGE_END = 599
16
- }
17
- export declare enum ProxyStatus {
18
- SUCCESS_RANGE_START = 200,
19
- SUCCESS_RANGE_END = 299,
20
- SERVER_ERROR = 500
21
- }
22
- /**
23
- * Constants used for region discovery
24
- */
25
- export declare const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME";
26
- /**
27
- * Constant used for PKCE
28
- */
29
- export declare const RANDOM_OCTET_SIZE = 32;
30
- /**
31
- * Constants used in PKCE
32
- */
33
- export declare const Hash: {
34
- SHA256: string;
35
- };
36
- /**
37
- * Constants for encoding schemes
38
- */
39
- export declare const CharSet: {
40
- CV_CHARSET: string;
41
- };
42
- /**
43
- * Cache Constants
44
- */
45
- export declare const CACHE: {
46
- FILE_CACHE: string;
47
- EXTENSION_LIB: string;
48
- };
49
- /**
50
- * Constants
51
- */
52
- export declare const Constants: {
53
- MSAL_SKU: string;
54
- JWT_BEARER_ASSERTION_TYPE: string;
55
- AUTHORIZATION_PENDING: string;
56
- HTTP_PROTOCOL: string;
57
- LOCALHOST: string;
58
- };
59
- /**
60
- * API Codes for Telemetry purposes.
61
- * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
62
- * 0-99 Silent Flow
63
- * 600-699 Device Code Flow
64
- * 800-899 Auth Code Flow
65
- */
66
- export declare enum ApiId {
67
- acquireTokenSilent = 62,
68
- acquireTokenByUsernamePassword = 371,
69
- acquireTokenByDeviceCode = 671,
70
- acquireTokenByClientCredential = 771,
71
- acquireTokenByCode = 871,
72
- acquireTokenByRefreshToken = 872
73
- }
74
- /**
75
- * JWT constants
76
- */
77
- export declare const JwtConstants: {
78
- ALGORITHM: string;
79
- RSA_256: string;
80
- X5T: string;
81
- X5C: string;
82
- AUDIENCE: string;
83
- EXPIRATION_TIME: string;
84
- ISSUER: string;
85
- SUBJECT: string;
86
- NOT_BEFORE: string;
87
- JWT_ID: string;
88
- };
89
- export declare const LOOPBACK_SERVER_CONSTANTS: {
90
- INTERVAL_MS: number;
91
- TIMEOUT_MS: number;
92
- };
1
+ /**
2
+ * http methods
3
+ */
4
+ export declare const HttpMethod: {
5
+ readonly GET: "get";
6
+ readonly POST: "post";
7
+ };
8
+ export type HttpMethod = typeof HttpMethod[keyof typeof HttpMethod];
9
+ export declare const HttpStatus: {
10
+ readonly SUCCESS_RANGE_START: 200;
11
+ readonly SUCCESS_RANGE_END: 299;
12
+ readonly REDIRECT: 302;
13
+ readonly CLIENT_ERROR_RANGE_START: 400;
14
+ readonly CLIENT_ERROR_RANGE_END: 499;
15
+ readonly SERVER_ERROR_RANGE_START: 500;
16
+ readonly SERVER_ERROR_RANGE_END: 599;
17
+ };
18
+ export type HttpStatus = typeof HttpStatus[keyof typeof HttpStatus];
19
+ export declare const ProxyStatus: {
20
+ readonly SUCCESS_RANGE_START: 200;
21
+ readonly SUCCESS_RANGE_END: 299;
22
+ readonly SERVER_ERROR: 500;
23
+ };
24
+ export type ProxyStatus = typeof ProxyStatus[keyof typeof ProxyStatus];
25
+ /**
26
+ * Constants used for region discovery
27
+ */
28
+ export declare const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME";
29
+ /**
30
+ * Constant used for PKCE
31
+ */
32
+ export declare const RANDOM_OCTET_SIZE = 32;
33
+ /**
34
+ * Constants used in PKCE
35
+ */
36
+ export declare const Hash: {
37
+ SHA256: string;
38
+ };
39
+ /**
40
+ * Constants for encoding schemes
41
+ */
42
+ export declare const CharSet: {
43
+ CV_CHARSET: string;
44
+ };
45
+ /**
46
+ * Cache Constants
47
+ */
48
+ export declare const CACHE: {
49
+ FILE_CACHE: string;
50
+ EXTENSION_LIB: string;
51
+ };
52
+ /**
53
+ * Constants
54
+ */
55
+ export declare const Constants: {
56
+ MSAL_SKU: string;
57
+ JWT_BEARER_ASSERTION_TYPE: string;
58
+ AUTHORIZATION_PENDING: string;
59
+ HTTP_PROTOCOL: string;
60
+ LOCALHOST: string;
61
+ };
62
+ /**
63
+ * API Codes for Telemetry purposes.
64
+ * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
65
+ * 0-99 Silent Flow
66
+ * 600-699 Device Code Flow
67
+ * 800-899 Auth Code Flow
68
+ */
69
+ export declare const ApiId: {
70
+ acquireTokenSilent: number;
71
+ acquireTokenByUsernamePassword: number;
72
+ acquireTokenByDeviceCode: number;
73
+ acquireTokenByClientCredential: number;
74
+ acquireTokenByCode: number;
75
+ acquireTokenByRefreshToken: number;
76
+ };
77
+ export type ApiId = typeof ApiId[keyof typeof ApiId];
78
+ /**
79
+ * JWT constants
80
+ */
81
+ export declare const JwtConstants: {
82
+ ALGORITHM: string;
83
+ RSA_256: string;
84
+ X5T: string;
85
+ X5C: string;
86
+ AUDIENCE: string;
87
+ EXPIRATION_TIME: string;
88
+ ISSUER: string;
89
+ SUBJECT: string;
90
+ NOT_BEFORE: string;
91
+ JWT_ID: string;
92
+ };
93
+ export declare const LOOPBACK_SERVER_CONSTANTS: {
94
+ INTERVAL_MS: number;
95
+ TIMEOUT_MS: number;
96
+ };
93
97
  //# 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,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AW,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEvE;;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;;;;;;CAOrB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;CAOjB,CAAA;AACD,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAWxB,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC"}
@@ -1,97 +1,93 @@
1
- /*! @azure/msal-node v2.0.0-alpha.1 2023-05-08 */
1
+ /*! @azure/msal-node v2.0.0-beta.0 2023-06-19 */
2
2
  'use strict';
3
- /*
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License.
6
- */
7
- /**
8
- * http methods
9
- */
10
- var HttpMethod;
11
- (function (HttpMethod) {
12
- HttpMethod["GET"] = "get";
13
- HttpMethod["POST"] = "post";
14
- })(HttpMethod || (HttpMethod = {}));
15
- var HttpStatus;
16
- (function (HttpStatus) {
17
- HttpStatus[HttpStatus["SUCCESS_RANGE_START"] = 200] = "SUCCESS_RANGE_START";
18
- HttpStatus[HttpStatus["SUCCESS_RANGE_END"] = 299] = "SUCCESS_RANGE_END";
19
- HttpStatus[HttpStatus["REDIRECT"] = 302] = "REDIRECT";
20
- HttpStatus[HttpStatus["CLIENT_ERROR_RANGE_START"] = 400] = "CLIENT_ERROR_RANGE_START";
21
- HttpStatus[HttpStatus["CLIENT_ERROR_RANGE_END"] = 499] = "CLIENT_ERROR_RANGE_END";
22
- HttpStatus[HttpStatus["SERVER_ERROR_RANGE_START"] = 500] = "SERVER_ERROR_RANGE_START";
23
- HttpStatus[HttpStatus["SERVER_ERROR_RANGE_END"] = 599] = "SERVER_ERROR_RANGE_END";
24
- })(HttpStatus || (HttpStatus = {}));
25
- var ProxyStatus;
26
- (function (ProxyStatus) {
27
- ProxyStatus[ProxyStatus["SUCCESS_RANGE_START"] = 200] = "SUCCESS_RANGE_START";
28
- ProxyStatus[ProxyStatus["SUCCESS_RANGE_END"] = 299] = "SUCCESS_RANGE_END";
29
- ProxyStatus[ProxyStatus["SERVER_ERROR"] = 500] = "SERVER_ERROR";
30
- })(ProxyStatus || (ProxyStatus = {}));
31
- /**
32
- * Constants used for region discovery
33
- */
34
- const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME";
35
- /**
36
- * Constant used for PKCE
37
- */
38
- const RANDOM_OCTET_SIZE = 32;
39
- /**
40
- * Constants used in PKCE
41
- */
42
- const Hash = {
43
- SHA256: "sha256",
44
- };
45
- /**
46
- * Constants for encoding schemes
47
- */
48
- const CharSet = {
49
- CV_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",
50
- };
51
- /**
52
- * Constants
53
- */
54
- const Constants = {
55
- MSAL_SKU: "msal.js.node",
56
- JWT_BEARER_ASSERTION_TYPE: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
57
- AUTHORIZATION_PENDING: "authorization_pending",
58
- HTTP_PROTOCOL: "http://",
59
- LOCALHOST: "localhost",
60
- };
61
- /**
62
- * API Codes for Telemetry purposes.
63
- * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
64
- * 0-99 Silent Flow
65
- * 600-699 Device Code Flow
66
- * 800-899 Auth Code Flow
67
- */
68
- var ApiId;
69
- (function (ApiId) {
70
- ApiId[ApiId["acquireTokenSilent"] = 62] = "acquireTokenSilent";
71
- ApiId[ApiId["acquireTokenByUsernamePassword"] = 371] = "acquireTokenByUsernamePassword";
72
- ApiId[ApiId["acquireTokenByDeviceCode"] = 671] = "acquireTokenByDeviceCode";
73
- ApiId[ApiId["acquireTokenByClientCredential"] = 771] = "acquireTokenByClientCredential";
74
- ApiId[ApiId["acquireTokenByCode"] = 871] = "acquireTokenByCode";
75
- ApiId[ApiId["acquireTokenByRefreshToken"] = 872] = "acquireTokenByRefreshToken";
76
- })(ApiId || (ApiId = {}));
77
- /**
78
- * JWT constants
79
- */
80
- const JwtConstants = {
81
- ALGORITHM: "alg",
82
- RSA_256: "RS256",
83
- X5T: "x5t",
84
- X5C: "x5c",
85
- AUDIENCE: "aud",
86
- EXPIRATION_TIME: "exp",
87
- ISSUER: "iss",
88
- SUBJECT: "sub",
89
- NOT_BEFORE: "nbf",
90
- JWT_ID: "jti",
91
- };
92
- const LOOPBACK_SERVER_CONSTANTS = {
93
- INTERVAL_MS: 100,
94
- TIMEOUT_MS: 5000,
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ /**
8
+ * http methods
9
+ */
10
+ const HttpMethod = {
11
+ GET: "get",
12
+ POST: "post",
13
+ };
14
+ const HttpStatus = {
15
+ SUCCESS_RANGE_START: 200,
16
+ SUCCESS_RANGE_END: 299,
17
+ REDIRECT: 302,
18
+ CLIENT_ERROR_RANGE_START: 400,
19
+ CLIENT_ERROR_RANGE_END: 499,
20
+ SERVER_ERROR_RANGE_START: 500,
21
+ SERVER_ERROR_RANGE_END: 599,
22
+ };
23
+ const ProxyStatus = {
24
+ SUCCESS_RANGE_START: 200,
25
+ SUCCESS_RANGE_END: 299,
26
+ SERVER_ERROR: 500,
27
+ };
28
+ /**
29
+ * Constants used for region discovery
30
+ */
31
+ const REGION_ENVIRONMENT_VARIABLE = "REGION_NAME";
32
+ /**
33
+ * Constant used for PKCE
34
+ */
35
+ const RANDOM_OCTET_SIZE = 32;
36
+ /**
37
+ * Constants used in PKCE
38
+ */
39
+ const Hash = {
40
+ SHA256: "sha256",
41
+ };
42
+ /**
43
+ * Constants for encoding schemes
44
+ */
45
+ const CharSet = {
46
+ CV_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",
47
+ };
48
+ /**
49
+ * Constants
50
+ */
51
+ const Constants = {
52
+ MSAL_SKU: "msal.js.node",
53
+ JWT_BEARER_ASSERTION_TYPE: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
54
+ AUTHORIZATION_PENDING: "authorization_pending",
55
+ HTTP_PROTOCOL: "http://",
56
+ LOCALHOST: "localhost",
57
+ };
58
+ /**
59
+ * API Codes for Telemetry purposes.
60
+ * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
61
+ * 0-99 Silent Flow
62
+ * 600-699 Device Code Flow
63
+ * 800-899 Auth Code Flow
64
+ */
65
+ const ApiId = {
66
+ acquireTokenSilent: 62,
67
+ acquireTokenByUsernamePassword: 371,
68
+ acquireTokenByDeviceCode: 671,
69
+ acquireTokenByClientCredential: 771,
70
+ acquireTokenByCode: 871,
71
+ acquireTokenByRefreshToken: 872,
72
+ };
73
+ /**
74
+ * JWT constants
75
+ */
76
+ const JwtConstants = {
77
+ ALGORITHM: "alg",
78
+ RSA_256: "RS256",
79
+ X5T: "x5t",
80
+ X5C: "x5c",
81
+ AUDIENCE: "aud",
82
+ EXPIRATION_TIME: "exp",
83
+ ISSUER: "iss",
84
+ SUBJECT: "sub",
85
+ NOT_BEFORE: "nbf",
86
+ JWT_ID: "jti",
87
+ };
88
+ const LOOPBACK_SERVER_CONSTANTS = {
89
+ INTERVAL_MS: 100,
90
+ TIMEOUT_MS: 5000,
95
91
  };
96
92
 
97
93
  export { ApiId, CharSet, Constants, Hash, HttpMethod, HttpStatus, JwtConstants, LOOPBACK_SERVER_CONSTANTS, ProxyStatus, RANDOM_OCTET_SIZE, REGION_ENVIRONMENT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