@azure/msal-node-extensions 5.1.5 → 5.2.1

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 (111) hide show
  1. package/bin/arm64/dpapi.node +0 -0
  2. package/bin/ia32/dpapi.node +0 -0
  3. package/bin/x64/dpapi.node +0 -0
  4. package/dist/Dpapi.mjs +1 -1
  5. package/dist/broker/NativeBrokerPlugin.mjs +1 -1
  6. package/dist/error/PersistenceError.mjs +1 -1
  7. package/dist/index.mjs +1 -1
  8. package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs +2 -2
  9. package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs.map +1 -1
  10. package/dist/lib/msal-common/dist/error/AuthError.mjs +2 -2
  11. package/dist/lib/msal-common/dist/error/AuthError.mjs.map +1 -1
  12. package/dist/lib/msal-common/dist/error/ClientAuthError.mjs +2 -2
  13. package/dist/lib/msal-common/dist/error/ClientAuthError.mjs.map +1 -1
  14. package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs +2 -2
  15. package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
  16. package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs +2 -2
  17. package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs.map +1 -1
  18. package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs +2 -2
  19. package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
  20. package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs +2 -2
  21. package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  22. package/dist/lib/msal-common/dist/error/PlatformBrokerError.mjs +2 -2
  23. package/dist/lib/msal-common/dist/error/PlatformBrokerError.mjs.map +1 -1
  24. package/dist/lib/msal-common/dist/error/ServerError.mjs +2 -2
  25. package/dist/lib/msal-common/dist/error/ServerError.mjs.map +1 -1
  26. package/dist/lib/msal-common/dist/logger/Logger.mjs +2 -2
  27. package/dist/lib/msal-common/dist/logger/Logger.mjs.map +1 -1
  28. package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs +2 -2
  29. package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
  30. package/dist/lib/msal-common/dist/utils/Constants.mjs +2 -2
  31. package/dist/lib/msal-common/dist/utils/Constants.mjs.map +1 -1
  32. package/dist/lib/msal-common/dist/utils/TimeUtils.mjs +2 -2
  33. package/dist/lib/msal-common/dist/utils/TimeUtils.mjs.map +1 -1
  34. package/dist/lock/CrossPlatformLock.mjs +1 -1
  35. package/dist/packageMetadata.mjs +2 -2
  36. package/dist/persistence/BasePersistence.mjs +1 -1
  37. package/dist/persistence/DataProtectionScope.mjs +1 -1
  38. package/dist/persistence/FilePersistence.mjs +1 -1
  39. package/dist/persistence/FilePersistenceWithDataProtection.mjs +1 -1
  40. package/dist/persistence/KeychainPersistence.mjs +1 -1
  41. package/dist/persistence/LibSecretPersistence.mjs +1 -1
  42. package/dist/persistence/PersistenceCachePlugin.mjs +1 -1
  43. package/dist/persistence/PersistenceCreator.mjs +1 -1
  44. package/dist/utils/Constants.mjs +1 -1
  45. package/dist/utils/Environment.mjs +1 -1
  46. package/dist/utils/TypeGuards.mjs +1 -1
  47. package/lib/msal-node-extensions.cjs +15 -15
  48. package/lib/msal-node-extensions.cjs.map +1 -1
  49. package/package.json +9 -7
  50. package/{dist → types}/Dpapi.d.ts +1 -0
  51. package/types/Dpapi.d.ts.map +1 -0
  52. package/{dist → types}/broker/NativeBrokerPlugin.d.ts +1 -0
  53. package/types/broker/NativeBrokerPlugin.d.ts.map +1 -0
  54. package/{dist → types}/error/PersistenceError.d.ts +1 -0
  55. package/types/error/PersistenceError.d.ts.map +1 -0
  56. package/types/index.d.cts +1 -0
  57. package/{lib/types → types}/index.d.ts +1 -0
  58. package/types/index.d.ts.map +1 -0
  59. package/{dist → types}/lock/CrossPlatformLock.d.ts +1 -0
  60. package/types/lock/CrossPlatformLock.d.ts.map +1 -0
  61. package/{dist → types}/lock/CrossPlatformLockOptions.d.ts +1 -0
  62. package/types/lock/CrossPlatformLockOptions.d.ts.map +1 -0
  63. package/types/packageMetadata.d.ts +3 -0
  64. package/types/packageMetadata.d.ts.map +1 -0
  65. package/{lib/types → types}/persistence/BasePersistence.d.ts +1 -0
  66. package/types/persistence/BasePersistence.d.ts.map +1 -0
  67. package/{dist → types}/persistence/DataProtectionScope.d.ts +1 -0
  68. package/types/persistence/DataProtectionScope.d.ts.map +1 -0
  69. package/{lib/types → types}/persistence/FilePersistence.d.ts +1 -0
  70. package/types/persistence/FilePersistence.d.ts.map +1 -0
  71. package/{lib/types → types}/persistence/FilePersistenceWithDataProtection.d.ts +1 -0
  72. package/types/persistence/FilePersistenceWithDataProtection.d.ts.map +1 -0
  73. package/{lib/types → types}/persistence/IPersistence.d.ts +1 -0
  74. package/types/persistence/IPersistence.d.ts.map +1 -0
  75. package/{lib/types → types}/persistence/IPersistenceConfiguration.d.ts +1 -0
  76. package/types/persistence/IPersistenceConfiguration.d.ts.map +1 -0
  77. package/{dist → types}/persistence/KeychainPersistence.d.ts +1 -0
  78. package/types/persistence/KeychainPersistence.d.ts.map +1 -0
  79. package/{lib/types → types}/persistence/LibSecretPersistence.d.ts +1 -0
  80. package/types/persistence/LibSecretPersistence.d.ts.map +1 -0
  81. package/{dist → types}/persistence/PersistenceCachePlugin.d.ts +1 -0
  82. package/types/persistence/PersistenceCachePlugin.d.ts.map +1 -0
  83. package/{dist → types}/persistence/PersistenceCreator.d.ts +1 -0
  84. package/types/persistence/PersistenceCreator.d.ts.map +1 -0
  85. package/{lib/types → types}/utils/Constants.d.ts +1 -0
  86. package/types/utils/Constants.d.ts.map +1 -0
  87. package/{lib/types → types}/utils/Environment.d.ts +1 -0
  88. package/types/utils/Environment.d.ts.map +1 -0
  89. package/{dist → types}/utils/TypeGuards.d.ts +1 -0
  90. package/types/utils/TypeGuards.d.ts.map +1 -0
  91. package/dist/index.d.ts +0 -12
  92. package/dist/packageMetadata.d.ts +0 -2
  93. package/dist/persistence/BasePersistence.d.ts +0 -5
  94. package/dist/persistence/FilePersistence.d.ts +0 -29
  95. package/dist/persistence/FilePersistenceWithDataProtection.d.ts +0 -24
  96. package/dist/persistence/IPersistence.d.ts +0 -11
  97. package/dist/persistence/IPersistenceConfiguration.d.ts +0 -10
  98. package/dist/persistence/LibSecretPersistence.d.ts +0 -24
  99. package/dist/utils/Constants.d.ts +0 -54
  100. package/dist/utils/Environment.d.ts +0 -16
  101. package/lib/types/Dpapi.d.ts +0 -6
  102. package/lib/types/broker/NativeBrokerPlugin.d.ts +0 -22
  103. package/lib/types/error/PersistenceError.d.ts +0 -57
  104. package/lib/types/lock/CrossPlatformLock.d.ts +0 -24
  105. package/lib/types/lock/CrossPlatformLockOptions.d.ts +0 -10
  106. package/lib/types/packageMetadata.d.ts +0 -2
  107. package/lib/types/persistence/DataProtectionScope.d.ts +0 -16
  108. package/lib/types/persistence/KeychainPersistence.d.ts +0 -23
  109. package/lib/types/persistence/PersistenceCachePlugin.d.ts +0 -38
  110. package/lib/types/persistence/PersistenceCreator.d.ts +0 -5
  111. package/lib/types/utils/TypeGuards.d.ts +0 -5
@@ -1,23 +0,0 @@
1
- import { IPersistence } from "./IPersistence.js";
2
- import { Logger, LoggerOptions } from "@azure/msal-common/node";
3
- import { BasePersistence } from "./BasePersistence.js";
4
- /**
5
- * Uses reads and writes passwords to macOS keychain
6
- *
7
- * serviceName: Identifier used as key for whatever value is stored
8
- * accountName: Account under which password should be stored
9
- */
10
- export declare class KeychainPersistence extends BasePersistence implements IPersistence {
11
- protected readonly serviceName: string;
12
- protected readonly accountName: string;
13
- private filePersistence;
14
- private constructor();
15
- static create(fileLocation: string, serviceName: string, accountName: string, loggerOptions?: LoggerOptions): Promise<KeychainPersistence>;
16
- save(contents: string): Promise<void>;
17
- load(): Promise<string | null>;
18
- delete(): Promise<boolean>;
19
- reloadNecessary(lastSync: number): Promise<boolean>;
20
- getFilePath(): string;
21
- getLogger(): Logger;
22
- createForPersistenceValidation(): Promise<KeychainPersistence>;
23
- }
@@ -1,38 +0,0 @@
1
- import { IPersistence } from "./IPersistence.js";
2
- import { CrossPlatformLockOptions } from "../lock/CrossPlatformLockOptions.js";
3
- import { TokenCacheContext, ICachePlugin } from "@azure/msal-common/node";
4
- /**
5
- * MSAL cache plugin which enables callers to write the MSAL cache to disk on Windows,
6
- * macOs, and Linux.
7
- *
8
- * - Persistence can be one of:
9
- * - FilePersistence: Writes and reads from an unencrypted file. Can be used on Windows,
10
- * macOs, or Linux.
11
- * - FilePersistenceWithDataProtection: Used on Windows, writes and reads from file encrypted
12
- * with windows dpapi-addon.
13
- * - KeychainPersistence: Used on macOs, writes and reads from keychain.
14
- * - LibSecretPersistence: Used on linux, writes and reads from secret service API. Requires
15
- * libsecret be installed.
16
- */
17
- export declare class PersistenceCachePlugin implements ICachePlugin {
18
- persistence: IPersistence;
19
- lastSync: number;
20
- currentCache: string | null;
21
- lockFilePath: string;
22
- private crossPlatformLock;
23
- private logger;
24
- constructor(persistence: IPersistence, lockOptions?: CrossPlatformLockOptions);
25
- /**
26
- * Reads from storage and saves an in-memory copy. If persistence has not been updated
27
- * since last time data was read, in memory copy is used.
28
- *
29
- * If cacheContext.cacheHasChanged === true, then file lock is created and not deleted until
30
- * afterCacheAccess() is called, to prevent the cache file from changing in between
31
- * beforeCacheAccess() and afterCacheAccess().
32
- */
33
- beforeCacheAccess(cacheContext: TokenCacheContext): Promise<void>;
34
- /**
35
- * Writes to storage if MSAL in memory copy of cache has been changed.
36
- */
37
- afterCacheAccess(cacheContext: TokenCacheContext): Promise<void>;
38
- }
@@ -1,5 +0,0 @@
1
- import { IPersistence } from "./IPersistence.js";
2
- import { IPersistenceConfiguration } from "./IPersistenceConfiguration.js";
3
- export declare class PersistenceCreator {
4
- static createPersistence(config: IPersistenceConfiguration): Promise<IPersistence>;
5
- }
@@ -1,5 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /**
3
- * Returns whether or not the given object is a Node.js error
4
- */
5
- export declare const isNodeError: (error: unknown) => error is NodeJS.ErrnoException;