@ms-cloudpack/remote-cache 0.10.23 → 0.11.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/{AzureRemoteCacheClient-UFUB2BJI.js → AzureRemoteCacheClient-RQPQQPU4.js} +187 -129
- package/dist/{chunk-JNKRKLGF.js → chunk-XND2VV4N.js} +7796 -217
- package/dist/index.js +19 -45
- package/lib/AzureAppRegistryClient.d.ts +1 -1
- package/lib/createAppRegistryClient.d.ts +1 -1
- package/lib/createRemoteCacheClient.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/package.json +3 -9
- package/dist/chunk-LEHUXQFL.js +0 -7606
- package/dist/chunk-N4V3CONX.js +0 -80
- package/dist/getCredential-EQJXGMRZ.js +0 -20878
- package/lib/authentication/forks/identity-cache-persistence/cachePersistencePlugin.d.ts +0 -34
- package/lib/authentication/forks/identity-cache-persistence/platforms.d.ts +0 -50
- package/lib/authentication/forks/identity-cache-persistence/provider.d.ts +0 -17
- package/lib/authentication/forks/msal-node-extensions/error/PersistenceError.d.ts +0 -37
- package/lib/authentication/forks/msal-node-extensions/lock/CrossPlatformLock.d.ts +0 -25
- package/lib/authentication/forks/msal-node-extensions/lock/CrossPlatformLockOptions.d.ts +0 -16
- package/lib/authentication/forks/msal-node-extensions/persistence/BasePersistence.d.ts +0 -6
- package/lib/authentication/forks/msal-node-extensions/persistence/FilePersistence.d.ts +0 -31
- package/lib/authentication/forks/msal-node-extensions/persistence/FilePersistenceWithDataProtection.d.ts +0 -30
- package/lib/authentication/forks/msal-node-extensions/persistence/IPersistence.d.ts +0 -17
- package/lib/authentication/forks/msal-node-extensions/persistence/IPersistenceConfiguration.d.ts +0 -16
- package/lib/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.d.ts +0 -19
- package/lib/authentication/forks/msal-node-extensions/persistence/PersistenceCachePlugin.d.ts +0 -35
- package/lib/authentication/forks/msal-node-extensions/utils/Constants.d.ts +0 -44
- package/lib/authentication/forks/msal-node-extensions/utils/TypeGuards.d.ts +0 -10
- package/lib/authentication/getAuthenticationRecord.d.ts +0 -8
- package/lib/authentication/getAuthenticationRecordPath.d.ts +0 -7
- package/lib/authentication/getCredential.d.ts +0 -21
- package/lib/authentication/lock-file/deleteAuthenticationLockFile.d.ts +0 -7
- package/lib/authentication/lock-file/doesLockFileExist.d.ts +0 -6
- package/lib/authentication/lock-file/getAuthenticationLockFilePath.d.ts +0 -19
- package/lib/authentication/lock-file/readAuthenticationLockFile.d.ts +0 -6
- package/lib/authentication/lock-file/tryCleaningLockFile.d.ts +0 -6
- package/lib/authentication/saveAuthenticationRecord.d.ts +0 -9
- package/lib/authentication/tokenCachePersistenceOptions.d.ts +0 -9
- package/lib/registerAzureLogger.d.ts +0 -6
- package/lib/types/LoginMethod.d.ts +0 -2
- package/lib/utils/isProcessRunning.d.ts +0 -7
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/identity-cache-persistence` package.
|
|
4
|
-
* https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity-cache-persistence/src/index.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { IdentityPlugin } from '@azure/identity';
|
|
7
|
-
/**
|
|
8
|
-
* A plugin that provides persistent token caching for `@azure/identity`
|
|
9
|
-
* credentials. The plugin API is compatible with `@azure/identity` versions
|
|
10
|
-
* 2.0.0 and later. Load this plugin using the `useIdentityPlugin`
|
|
11
|
-
* function, imported from `@azure/identity`.
|
|
12
|
-
*
|
|
13
|
-
* In order to enable this functionality, you must also pass
|
|
14
|
-
* `tokenCachePersistenceOptions` to your credential constructors with an
|
|
15
|
-
* `enabled` property set to true.
|
|
16
|
-
*
|
|
17
|
-
* Example:
|
|
18
|
-
*
|
|
19
|
-
* ```javascript
|
|
20
|
-
* import { useIdentityPlugin, DeviceCodeCredential } from "@azure/identity";
|
|
21
|
-
* import { cachePersistencePlugin } from "@azure/identity-cache-persistence";
|
|
22
|
-
*
|
|
23
|
-
* // Load the plugin
|
|
24
|
-
* useIdentityPlugin(cachePersistencePlugin);
|
|
25
|
-
*
|
|
26
|
-
* const credential = new DeviceCodeCredential({
|
|
27
|
-
* tokenCachePersistenceOptions: {
|
|
28
|
-
* enabled: true
|
|
29
|
-
* }
|
|
30
|
-
* });
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare const cachePersistencePlugin: IdentityPlugin;
|
|
34
|
-
//# sourceMappingURL=cachePersistencePlugin.d.ts.map
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { TokenCachePersistenceOptions } from '@azure/identity';
|
|
2
|
-
import type { IPersistence } from '../msal-node-extensions/persistence/IPersistence.js';
|
|
3
|
-
/**
|
|
4
|
-
* Dictionary of values that we use as default as we discover, pick and enable the persistence layer.
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export declare const defaultMsalValues: {
|
|
8
|
-
tokenCache: {
|
|
9
|
-
name: string;
|
|
10
|
-
directory: string;
|
|
11
|
-
};
|
|
12
|
-
keyRing: {
|
|
13
|
-
label: string;
|
|
14
|
-
schema: string;
|
|
15
|
-
collection: string;
|
|
16
|
-
attributes: {
|
|
17
|
-
MsalClientID: string;
|
|
18
|
-
'Microsoft.Developer.IdentityService': string;
|
|
19
|
-
};
|
|
20
|
-
service: string;
|
|
21
|
-
account: string;
|
|
22
|
-
};
|
|
23
|
-
keyChain: {
|
|
24
|
-
service: string;
|
|
25
|
-
account: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Options that are used by the underlying MSAL cache provider.
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
export type MsalPersistenceOptions = Omit<TokenCachePersistenceOptions, 'enabled'>;
|
|
33
|
-
/**
|
|
34
|
-
* A function that returns a persistent token cache instance.
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
type MsalPersistenceFactory = (options?: MsalPersistenceOptions) => Promise<IPersistence>;
|
|
38
|
-
/**
|
|
39
|
-
* Set of the platforms we attempt to deliver persistence on.
|
|
40
|
-
*
|
|
41
|
-
* - On Windows we use DPAPI.
|
|
42
|
-
* - On OSX (Darwin) and Linux, we try to use the system's Keyring, otherwise if the property `unsafeAllowUnencryptedStorage` is set to true, we use an unencrypted file.
|
|
43
|
-
*
|
|
44
|
-
* Other platforms _are not supported_ at this time.
|
|
45
|
-
*
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
48
|
-
export declare const msalPersistencePlatforms: Partial<Record<NodeJS.Platform, MsalPersistenceFactory>>;
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=platforms.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/identity-cache-persistence` package.
|
|
4
|
-
* https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity-cache-persistence/src/provider.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { MsalPersistenceOptions } from './platforms.js';
|
|
7
|
-
import type { ICachePlugin as CachePlugin } from '@azure/msal-node';
|
|
8
|
-
import type { IPersistence } from '../msal-node-extensions/persistence/IPersistence.js';
|
|
9
|
-
/**
|
|
10
|
-
* This is used to gain access to the underlying Persistence instance, which we use for testing
|
|
11
|
-
*
|
|
12
|
-
* @returns a raw persistence instance
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare function createPersistence(options: MsalPersistenceOptions): Promise<IPersistence>;
|
|
16
|
-
export declare function createPersistenceCachePlugin(options?: MsalPersistenceOptions): Promise<CachePlugin>;
|
|
17
|
-
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/error/PersistenceError.ts
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Error thrown when trying to write MSAL cache to persistence.
|
|
8
|
-
*/
|
|
9
|
-
export declare class PersistenceError extends Error {
|
|
10
|
-
errorCode: string;
|
|
11
|
-
errorMessage: string;
|
|
12
|
-
constructor(errorCode: string, errorMessage: string);
|
|
13
|
-
/**
|
|
14
|
-
* Error thrown when trying to access the file system.
|
|
15
|
-
*/
|
|
16
|
-
static createFileSystemError(errorCode: string, errorMessage: string): PersistenceError;
|
|
17
|
-
/**
|
|
18
|
-
* Error thrown when trying to encrypt or decrypt data using DPAPI on Windows.
|
|
19
|
-
*/
|
|
20
|
-
static createFilePersistenceWithDPAPIError(errorMessage: string): PersistenceError;
|
|
21
|
-
/**
|
|
22
|
-
* Error thrown when using the cross platform lock.
|
|
23
|
-
*/
|
|
24
|
-
static createCrossPlatformLockError(errorMessage: string): PersistenceError;
|
|
25
|
-
/**
|
|
26
|
-
* Error thrown when trying to write, load, or delete data from NapiRsKeyRingPersistence.
|
|
27
|
-
*/
|
|
28
|
-
static createNapiRsKeyRingPersistenceError(errorMessage: string): PersistenceError;
|
|
29
|
-
/**
|
|
30
|
-
* Throw cache persistence error
|
|
31
|
-
*
|
|
32
|
-
* @param errorMessage string
|
|
33
|
-
* @returns PersistenceError
|
|
34
|
-
*/
|
|
35
|
-
static createCachePersistenceError(errorMessage: string): PersistenceError;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=PersistenceError.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { CrossPlatformLockOptions } from './CrossPlatformLockOptions.js';
|
|
2
|
-
import type { Logger } from '@azure/msal-common';
|
|
3
|
-
/**
|
|
4
|
-
* Cross-process lock that works on all platforms.
|
|
5
|
-
*/
|
|
6
|
-
export declare class CrossPlatformLock {
|
|
7
|
-
private readonly lockFilePath;
|
|
8
|
-
private lockFileHandle;
|
|
9
|
-
private readonly retryNumber;
|
|
10
|
-
private readonly retryDelay;
|
|
11
|
-
private logger;
|
|
12
|
-
constructor(lockFilePath: string, logger: Logger, lockOptions?: CrossPlatformLockOptions);
|
|
13
|
-
/**
|
|
14
|
-
* Locks cache from read or writes by creating file with same path and name as
|
|
15
|
-
* cache file but with .lockfile extension. If another process has already created
|
|
16
|
-
* the lockfile, will back off and retry based on configuration settings set by CrossPlatformLockOptions
|
|
17
|
-
*/
|
|
18
|
-
lock(): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* unlocks cache file by deleting .lockfile.
|
|
21
|
-
*/
|
|
22
|
-
unlock(): Promise<void>;
|
|
23
|
-
private sleep;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=CrossPlatformLock.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/lock/CrossPlatformLockOptions.ts
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Options for CrossPlatform lock.
|
|
8
|
-
*
|
|
9
|
-
* retryNumber: Numbers of times we should try to acquire a lock. Defaults to 500.
|
|
10
|
-
* retryDelay: Time to wait before trying to retry a lock acquisition. Defaults to 100 ms.
|
|
11
|
-
*/
|
|
12
|
-
export type CrossPlatformLockOptions = {
|
|
13
|
-
retryNumber: number;
|
|
14
|
-
retryDelay: number;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=CrossPlatformLockOptions.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { IPersistence } from './IPersistence.js';
|
|
2
|
-
import type { LoggerOptions } from '@azure/msal-common';
|
|
3
|
-
import { Logger } from '@azure/msal-common';
|
|
4
|
-
import { BasePersistence } from './BasePersistence.js';
|
|
5
|
-
/**
|
|
6
|
-
* Reads and writes data to file specified by file location. File contents are not
|
|
7
|
-
* encrypted.
|
|
8
|
-
*
|
|
9
|
-
* If file or directory has not been created, it FilePersistence.create() will create
|
|
10
|
-
* file and any directories in the path recursively.
|
|
11
|
-
*/
|
|
12
|
-
export declare class FilePersistence extends BasePersistence implements IPersistence {
|
|
13
|
-
private filePath;
|
|
14
|
-
private logger;
|
|
15
|
-
private constructor();
|
|
16
|
-
static create(fileLocation: string, loggerOptions?: LoggerOptions): Promise<FilePersistence>;
|
|
17
|
-
save(contents: string): Promise<void>;
|
|
18
|
-
saveBuffer(contents: Uint8Array): Promise<void>;
|
|
19
|
-
load(): Promise<string | null>;
|
|
20
|
-
loadBuffer(): Promise<Uint8Array>;
|
|
21
|
-
delete(): Promise<boolean>;
|
|
22
|
-
getFilePath(): string;
|
|
23
|
-
reloadNecessary(lastSync: number): Promise<boolean>;
|
|
24
|
-
getLogger(): Logger;
|
|
25
|
-
createForPersistenceValidation(): Promise<FilePersistence>;
|
|
26
|
-
private static createDefaultLoggerOptions;
|
|
27
|
-
private timeLastModified;
|
|
28
|
-
private createCacheFile;
|
|
29
|
-
private createFileDirectory;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=FilePersistence.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/FilePersistenceWithDataProtection.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { IPersistence } from './IPersistence.js';
|
|
7
|
-
import { type DataProtectionScope } from 'node-dpapi-prebuilt';
|
|
8
|
-
import type { Logger, LoggerOptions } from '@azure/msal-common';
|
|
9
|
-
import { BasePersistence } from './BasePersistence.js';
|
|
10
|
-
/**
|
|
11
|
-
* Uses CryptProtectData and CryptUnprotectData on Windows to encrypt and decrypt file contents.
|
|
12
|
-
*
|
|
13
|
-
* scope: Scope of the data protection. Either local user or the current machine
|
|
14
|
-
* optionalEntropy: Password or other additional entropy used to encrypt the data
|
|
15
|
-
*/
|
|
16
|
-
export declare class FilePersistenceWithDataProtection extends BasePersistence implements IPersistence {
|
|
17
|
-
private filePersistence;
|
|
18
|
-
private scope;
|
|
19
|
-
private optionalEntropy;
|
|
20
|
-
private constructor();
|
|
21
|
-
static create(fileLocation: string, scope: DataProtectionScope, optionalEntropy?: string, loggerOptions?: LoggerOptions): Promise<FilePersistenceWithDataProtection>;
|
|
22
|
-
save(contents: string): Promise<void>;
|
|
23
|
-
load(): Promise<string | null>;
|
|
24
|
-
delete(): Promise<boolean>;
|
|
25
|
-
reloadNecessary(lastSync: number): Promise<boolean>;
|
|
26
|
-
getFilePath(): string;
|
|
27
|
-
getLogger(): Logger;
|
|
28
|
-
createForPersistenceValidation(): Promise<FilePersistenceWithDataProtection>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=FilePersistenceWithDataProtection.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/IPersistence.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { Logger } from '@azure/msal-common';
|
|
7
|
-
export interface IPersistence {
|
|
8
|
-
save(contents: string): Promise<void>;
|
|
9
|
-
load(): Promise<string | null>;
|
|
10
|
-
delete(): Promise<boolean>;
|
|
11
|
-
reloadNecessary(lastSync: number): Promise<boolean>;
|
|
12
|
-
getFilePath(): string;
|
|
13
|
-
getLogger(): Logger;
|
|
14
|
-
verifyPersistence(): Promise<boolean>;
|
|
15
|
-
createForPersistenceValidation(): Promise<IPersistence>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=IPersistence.d.ts.map
|
package/lib/authentication/forks/msal-node-extensions/persistence/IPersistenceConfiguration.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/IPersistenceConfiguration.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { LoggerOptions } from '@azure/msal-common';
|
|
7
|
-
import type { DataProtectionScope } from 'node-dpapi-prebuilt';
|
|
8
|
-
export interface IPersistenceConfiguration {
|
|
9
|
-
cachePath?: string;
|
|
10
|
-
dataProtectionScope?: DataProtectionScope;
|
|
11
|
-
serviceName?: string;
|
|
12
|
-
accountName?: string;
|
|
13
|
-
usePlaintextFileOnLinux?: boolean;
|
|
14
|
-
loggerOptions?: LoggerOptions;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=IPersistenceConfiguration.d.ts.map
|
package/lib/authentication/forks/msal-node-extensions/persistence/NapiRsKeyRingPersistence.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Logger, LoggerOptions } from '@azure/msal-common';
|
|
2
|
-
import { BasePersistence } from './BasePersistence.js';
|
|
3
|
-
import type { IPersistence } from './IPersistence.js';
|
|
4
|
-
export declare class NapiRsKeyRingPersistence extends BasePersistence implements IPersistence {
|
|
5
|
-
readonly service: string;
|
|
6
|
-
readonly account: string;
|
|
7
|
-
private readonly entry;
|
|
8
|
-
private readonly filePersistence;
|
|
9
|
-
private constructor();
|
|
10
|
-
static create(fileLocation: string, serviceName: string, accountName: string, loggerOptions?: LoggerOptions): Promise<NapiRsKeyRingPersistence>;
|
|
11
|
-
save(contents: string): Promise<void>;
|
|
12
|
-
load(): Promise<string | null>;
|
|
13
|
-
delete(): Promise<boolean>;
|
|
14
|
-
reloadNecessary(lastSync: number): Promise<boolean>;
|
|
15
|
-
getFilePath(): string;
|
|
16
|
-
getLogger(): Logger;
|
|
17
|
-
createForPersistenceValidation(): Promise<IPersistence>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=NapiRsKeyRingPersistence.d.ts.map
|
package/lib/authentication/forks/msal-node-extensions/persistence/PersistenceCachePlugin.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/persistence/PersistenceCachePlugin.ts
|
|
5
|
-
*/
|
|
6
|
-
import type { IPersistence } from './IPersistence.js';
|
|
7
|
-
import type { CrossPlatformLockOptions } from '../lock/CrossPlatformLockOptions.js';
|
|
8
|
-
import type { TokenCacheContext, ICachePlugin } from '@azure/msal-common';
|
|
9
|
-
/**
|
|
10
|
-
* MSAL cache plugin which enables callers to write the MSAL cache to disk on Windows,
|
|
11
|
-
* macOs, and Linux.
|
|
12
|
-
*/
|
|
13
|
-
export declare class PersistenceCachePlugin implements ICachePlugin {
|
|
14
|
-
persistence: IPersistence;
|
|
15
|
-
lastSync: number;
|
|
16
|
-
currentCache: string | null;
|
|
17
|
-
lockFilePath: string;
|
|
18
|
-
private crossPlatformLock;
|
|
19
|
-
private logger;
|
|
20
|
-
constructor(persistence: IPersistence, lockOptions?: CrossPlatformLockOptions);
|
|
21
|
-
/**
|
|
22
|
-
* Reads from storage and saves an in-memory copy. If persistence has not been updated
|
|
23
|
-
* since last time data was read, in memory copy is used.
|
|
24
|
-
*
|
|
25
|
-
* If cacheContext.cacheHasChanged === true, then file lock is created and not deleted until
|
|
26
|
-
* afterCacheAccess() is called, to prevent the cache file from changing in between
|
|
27
|
-
* beforeCacheAccess() and afterCacheAccess().
|
|
28
|
-
*/
|
|
29
|
-
beforeCacheAccess(cacheContext: TokenCacheContext): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Writes to storage if MSAL in memory copy of cache has been changed.
|
|
32
|
-
*/
|
|
33
|
-
afterCacheAccess(cacheContext: TokenCacheContext): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=PersistenceCachePlugin.d.ts.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/utils/Constants.ts
|
|
5
|
-
*/
|
|
6
|
-
export declare const Constants: {
|
|
7
|
-
/**
|
|
8
|
-
* An existing file was the target of an operation that required that the target not exist
|
|
9
|
-
*/
|
|
10
|
-
EEXIST_ERROR: string;
|
|
11
|
-
/**
|
|
12
|
-
* No such file or directory: Commonly raised by fs operations to indicate that a component
|
|
13
|
-
* of the specified pathname does not exist. No entity (file or directory) could be found
|
|
14
|
-
* by the given path
|
|
15
|
-
*/
|
|
16
|
-
ENOENT_ERROR: string;
|
|
17
|
-
/**
|
|
18
|
-
* Operation not permitted. An attempt was made to perform an operation that requires
|
|
19
|
-
* elevated privileges.
|
|
20
|
-
*/
|
|
21
|
-
EPERM_ERROR: string;
|
|
22
|
-
/**
|
|
23
|
-
* Default service name for using MSAL Keytar
|
|
24
|
-
*/
|
|
25
|
-
DEFAULT_SERVICE_NAME: string;
|
|
26
|
-
/**
|
|
27
|
-
* Test data used to verify underlying persistence mechanism
|
|
28
|
-
*/
|
|
29
|
-
PERSISTENCE_TEST_DATA: string;
|
|
30
|
-
DEFAULT_CACHE_FILE_NAME: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const Platform: {
|
|
33
|
-
readonly WINDOWS: "win32";
|
|
34
|
-
readonly LINUX: "linux";
|
|
35
|
-
readonly MACOS: "darwin";
|
|
36
|
-
};
|
|
37
|
-
export type Platform = (typeof Platform)[keyof typeof Platform];
|
|
38
|
-
export declare const ErrorCodes: {
|
|
39
|
-
readonly INTERATION_REQUIRED_ERROR_CODE: "interaction_required";
|
|
40
|
-
readonly SERVER_UNAVAILABLE: "server_unavailable";
|
|
41
|
-
readonly UNKNOWN: "unknown_error";
|
|
42
|
-
};
|
|
43
|
-
export type ErrorCodes = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
44
|
-
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FORK NOTE:
|
|
3
|
-
* This file has been copied over from the `@azure/msal-node-extensions` package.
|
|
4
|
-
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/extensions/msal-node-extensions/src/utils/TypeGuards.ts
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Returns whether or not the given object is a Node.js error
|
|
8
|
-
*/
|
|
9
|
-
export declare const isNodeError: (error: unknown) => error is NodeJS.ErrnoException;
|
|
10
|
-
//# sourceMappingURL=TypeGuards.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type AuthenticationRecord } from '@azure/identity';
|
|
2
|
-
/**
|
|
3
|
-
* Retrieves the authentication record from Cloudpack's global cache folder.
|
|
4
|
-
* @param cachePath - The path to Cloudpack's cache folder.
|
|
5
|
-
* @returns - The authentication record if it exists; otherwise, returns `undefined`.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getAuthenticationRecord(cachePath: string): AuthenticationRecord | undefined;
|
|
8
|
-
//# sourceMappingURL=getAuthenticationRecord.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constructs and returns the full path to the authentication record file within the specified cache folder.
|
|
3
|
-
* @param cachePath - The path to Cloudpack's cache folder.
|
|
4
|
-
* @returns - The full path to the authentication record file.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getAuthenticationRecordPath(cachePath: string): string;
|
|
7
|
-
//# sourceMappingURL=getAuthenticationRecordPath.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type TokenCredential } from '@azure/identity';
|
|
2
|
-
import type { LoginMethod } from '../types/LoginMethod.js';
|
|
3
|
-
import type { TaskReporter } from '@ms-cloudpack/task-reporter';
|
|
4
|
-
import type EventEmitter from 'events';
|
|
5
|
-
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
6
|
-
/**
|
|
7
|
-
* Gets a credential for the given login method.
|
|
8
|
-
* If the login method is 'azure-cli', it will return an AzureCliCredential.
|
|
9
|
-
* Otherwise, it will return an InteractiveBrowserCredential or a DeviceCodeCredential with persistent token settings.
|
|
10
|
-
* If an authentication record has never been saved before, it will authenticate the credential and save the authentication record.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getCredential(options: {
|
|
13
|
-
loginMethod: LoginMethod;
|
|
14
|
-
cachePath: string;
|
|
15
|
-
tenantId?: string;
|
|
16
|
-
}, context: {
|
|
17
|
-
reporter: TaskReporter;
|
|
18
|
-
azureLogger: EventEmitter;
|
|
19
|
-
telemetryClient: TelemetryClient;
|
|
20
|
-
}): Promise<TokenCredential>;
|
|
21
|
-
//# sourceMappingURL=getCredential.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deletes the authentication lock file.
|
|
3
|
-
* If the file does not exist or is currently in use, cannot be deleted due to permission issues, it logs an error message.
|
|
4
|
-
* @returns - true if the file was successfully deleted, false otherwise.
|
|
5
|
-
*/
|
|
6
|
-
export declare function deleteAuthenticationLockFile(): boolean;
|
|
7
|
-
//# sourceMappingURL=deleteAuthenticationLockFile.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @returns The file path of the authentication lock file.
|
|
3
|
-
* Expected responses:
|
|
4
|
-
* - Darwin: `/Users/user/.IdentityService/cloudpack.lockfile`
|
|
5
|
-
* - Windows 8+: `C:\Users\user\AppData\Local\.IdentityService\cloudpack.lockfile`
|
|
6
|
-
* - Linux: `/home/user/.IdentityService/cloudpack.lockfile`
|
|
7
|
-
*
|
|
8
|
-
* The lock file is generated by the @azure/identity and msal-node-extensions packages. Unfortunately, these packages do not provide an API to retrieve the lock file path directly. Therefore, we've implemented a function to obtain their lock file path, albeit without a formal contract.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getAuthenticationLockFilePath(): string;
|
|
11
|
-
/**
|
|
12
|
-
* Local application data folder
|
|
13
|
-
* Expected values:
|
|
14
|
-
* - Darwin: `/Users/user/`
|
|
15
|
-
* - Windows 8+: `C:\Users\user\AppData\Local`
|
|
16
|
-
* - Linux: `/home/user/.local/share`
|
|
17
|
-
*/
|
|
18
|
-
export declare function getIdentityServiceCachePath(): string;
|
|
19
|
-
//# sourceMappingURL=getAuthenticationLockFilePath.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads the authentication lock file and parse the content to int.
|
|
3
|
-
* @returns - The process ID stored in the authentication lock file.
|
|
4
|
-
*/
|
|
5
|
-
export declare function readAuthenticationLockFile(): number;
|
|
6
|
-
//# sourceMappingURL=readAuthenticationLockFile.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tries to clean the authentication lock file by deleting it if the other process is not running.
|
|
3
|
-
* @returns - true if the lock file is deleted successfully, false otherwise.
|
|
4
|
-
*/
|
|
5
|
-
export declare function tryCleaningLockFile(): boolean;
|
|
6
|
-
//# sourceMappingURL=tryCleaningLockFile.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type AuthenticationRecord } from '@azure/identity';
|
|
2
|
-
/**
|
|
3
|
-
* Saves the provided authentication record to Cloudpack's global cache folder.
|
|
4
|
-
* Creates the cache folder if it doesn't exist.
|
|
5
|
-
* @param cachePath - The path to Cloudpack's cache folder.
|
|
6
|
-
* @param authRecord - The authentication record to save.
|
|
7
|
-
*/
|
|
8
|
-
export declare function saveAuthenticationRecord(cachePath: string, authRecord: AuthenticationRecord): void;
|
|
9
|
-
//# sourceMappingURL=saveAuthenticationRecord.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type TokenCachePersistenceOptions } from '@azure/identity';
|
|
2
|
-
/**
|
|
3
|
-
* The options for token cache persistence.
|
|
4
|
-
* This will be used by the token cache plugin.
|
|
5
|
-
*/
|
|
6
|
-
export declare const tokenCachePersistenceOptions: TokenCachePersistenceOptions & {
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=tokenCachePersistenceOptions.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if a process with the given PID is running.
|
|
3
|
-
* @param pid - The process ID to check.
|
|
4
|
-
* @returns - true if the process is running, false otherwise.
|
|
5
|
-
*/
|
|
6
|
-
export declare function isProcessRunning(pid: number): boolean;
|
|
7
|
-
//# sourceMappingURL=isProcessRunning.d.ts.map
|