@azure/identity-cache-persistence 1.1.2-alpha.20241230.2 → 1.1.2-alpha.20250106.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.
- package/README.md +2 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/commonjs/index.d.ts +2 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/react-native/index.d.ts +2 -0
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +2 -0
- package/dist/react-native/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,8 +52,10 @@ const credential = new DeviceCodeCredential({
|
|
|
52
52
|
enabled: true,
|
|
53
53
|
},
|
|
54
54
|
});
|
|
55
|
+
|
|
55
56
|
// We'll use the Microsoft Graph scope as an example
|
|
56
57
|
const scope = "https://graph.microsoft.com/.default";
|
|
58
|
+
|
|
57
59
|
// Print out part of the access token
|
|
58
60
|
console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
59
61
|
```
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
19
19
|
* enabled: true,
|
|
20
20
|
* },
|
|
21
21
|
* });
|
|
22
|
+
*
|
|
22
23
|
* // We'll use the Microsoft Graph scope as an example
|
|
23
24
|
* const scope = "https://graph.microsoft.com/.default";
|
|
25
|
+
*
|
|
24
26
|
* // Print out part of the access token
|
|
25
27
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
26
28
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,sBAAsB,EAAE,cAIpC,CAAC"}
|
package/dist/browser/index.js
CHANGED
|
@@ -21,8 +21,10 @@ import { createPersistenceCachePlugin } from "./provider.js";
|
|
|
21
21
|
* enabled: true,
|
|
22
22
|
* },
|
|
23
23
|
* });
|
|
24
|
+
*
|
|
24
25
|
* // We'll use the Microsoft Graph scope as an example
|
|
25
26
|
* const scope = "https://graph.microsoft.com/.default";
|
|
27
|
+
*
|
|
26
28
|
* // Print out part of the access token
|
|
27
29
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
28
30
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAuB7D
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAuB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAmB,CAAC,OAAO,EAAE,EAAE;IAChE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAA6B,CAAC;IAE7D,kBAAkB,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC;AAClE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin, TokenCachePersistenceOptions } from \"@azure/identity\";\nimport { createPersistenceCachePlugin } from \"./provider.js\";\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\ninterface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n/**\n * Context options passed to a plugin during initialization.\n *\n * Represents a subset of the context defined in `@azure/identity`\n *\n */\ninterface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n}\n\n/**\n * A plugin that provides persistent token caching for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 2.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * In order to enable this functionality, you must also pass\n * `tokenCachePersistenceOptions` to your credential constructors with an\n * `enabled` property set to true.\n *\n * Example:\n *\n * ```ts snippet:device_code_credential_example\n * import { DeviceCodeCredential } from \"@azure/identity\";\n *\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n *\n * // We'll use the Microsoft Graph scope as an example\n * const scope = \"https://graph.microsoft.com/.default\";\n *\n * // Print out part of the access token\n * console.log((await credential.getToken(scope)).token.substring(0, 10), \"...\");\n * ```\n */\n\nexport const cachePersistencePlugin: IdentityPlugin = (context) => {\n const { cachePluginControl } = context as AzurePluginContext;\n\n cachePluginControl.setPersistence(createPersistenceCachePlugin);\n};\n"]}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
19
19
|
* enabled: true,
|
|
20
20
|
* },
|
|
21
21
|
* });
|
|
22
|
+
*
|
|
22
23
|
* // We'll use the Microsoft Graph scope as an example
|
|
23
24
|
* const scope = "https://graph.microsoft.com/.default";
|
|
25
|
+
*
|
|
24
26
|
* // Print out part of the access token
|
|
25
27
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
26
28
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,sBAAsB,EAAE,cAIpC,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -24,8 +24,10 @@ const provider_js_1 = require("./provider.js");
|
|
|
24
24
|
* enabled: true,
|
|
25
25
|
* },
|
|
26
26
|
* });
|
|
27
|
+
*
|
|
27
28
|
* // We'll use the Microsoft Graph scope as an example
|
|
28
29
|
* const scope = "https://graph.microsoft.com/.default";
|
|
30
|
+
*
|
|
29
31
|
* // Print out part of the access token
|
|
30
32
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
31
33
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,+CAA6D;AAuB7D
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,+CAA6D;AAuB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEI,MAAM,sBAAsB,GAAmB,CAAC,OAAO,EAAE,EAAE;IAChE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAA6B,CAAC;IAE7D,kBAAkB,CAAC,cAAc,CAAC,0CAA4B,CAAC,CAAC;AAClE,CAAC,CAAC;AAJW,QAAA,sBAAsB,0BAIjC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin, TokenCachePersistenceOptions } from \"@azure/identity\";\nimport { createPersistenceCachePlugin } from \"./provider.js\";\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\ninterface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n/**\n * Context options passed to a plugin during initialization.\n *\n * Represents a subset of the context defined in `@azure/identity`\n *\n */\ninterface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n}\n\n/**\n * A plugin that provides persistent token caching for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 2.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * In order to enable this functionality, you must also pass\n * `tokenCachePersistenceOptions` to your credential constructors with an\n * `enabled` property set to true.\n *\n * Example:\n *\n * ```ts snippet:device_code_credential_example\n * import { DeviceCodeCredential } from \"@azure/identity\";\n *\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n *\n * // We'll use the Microsoft Graph scope as an example\n * const scope = \"https://graph.microsoft.com/.default\";\n *\n * // Print out part of the access token\n * console.log((await credential.getToken(scope)).token.substring(0, 10), \"...\");\n * ```\n */\n\nexport const cachePersistencePlugin: IdentityPlugin = (context) => {\n const { cachePluginControl } = context as AzurePluginContext;\n\n cachePluginControl.setPersistence(createPersistenceCachePlugin);\n};\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
19
19
|
* enabled: true,
|
|
20
20
|
* },
|
|
21
21
|
* });
|
|
22
|
+
*
|
|
22
23
|
* // We'll use the Microsoft Graph scope as an example
|
|
23
24
|
* const scope = "https://graph.microsoft.com/.default";
|
|
25
|
+
*
|
|
24
26
|
* // Print out part of the access token
|
|
25
27
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
26
28
|
* ```
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,sBAAsB,EAAE,cAIpC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -21,8 +21,10 @@ import { createPersistenceCachePlugin } from "./provider.js";
|
|
|
21
21
|
* enabled: true,
|
|
22
22
|
* },
|
|
23
23
|
* });
|
|
24
|
+
*
|
|
24
25
|
* // We'll use the Microsoft Graph scope as an example
|
|
25
26
|
* const scope = "https://graph.microsoft.com/.default";
|
|
27
|
+
*
|
|
26
28
|
* // Print out part of the access token
|
|
27
29
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
28
30
|
* ```
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAuB7D
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAuB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAmB,CAAC,OAAO,EAAE,EAAE;IAChE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAA6B,CAAC;IAE7D,kBAAkB,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC;AAClE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin, TokenCachePersistenceOptions } from \"@azure/identity\";\nimport { createPersistenceCachePlugin } from \"./provider.js\";\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\ninterface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n/**\n * Context options passed to a plugin during initialization.\n *\n * Represents a subset of the context defined in `@azure/identity`\n *\n */\ninterface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n}\n\n/**\n * A plugin that provides persistent token caching for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 2.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * In order to enable this functionality, you must also pass\n * `tokenCachePersistenceOptions` to your credential constructors with an\n * `enabled` property set to true.\n *\n * Example:\n *\n * ```ts snippet:device_code_credential_example\n * import { DeviceCodeCredential } from \"@azure/identity\";\n *\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n *\n * // We'll use the Microsoft Graph scope as an example\n * const scope = \"https://graph.microsoft.com/.default\";\n *\n * // Print out part of the access token\n * console.log((await credential.getToken(scope)).token.substring(0, 10), \"...\");\n * ```\n */\n\nexport const cachePersistencePlugin: IdentityPlugin = (context) => {\n const { cachePluginControl } = context as AzurePluginContext;\n\n cachePluginControl.setPersistence(createPersistenceCachePlugin);\n};\n"]}
|
|
@@ -19,8 +19,10 @@ import type { IdentityPlugin } from "@azure/identity";
|
|
|
19
19
|
* enabled: true,
|
|
20
20
|
* },
|
|
21
21
|
* });
|
|
22
|
+
*
|
|
22
23
|
* // We'll use the Microsoft Graph scope as an example
|
|
23
24
|
* const scope = "https://graph.microsoft.com/.default";
|
|
25
|
+
*
|
|
24
26
|
* // Print out part of the access token
|
|
25
27
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
26
28
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,iBAAiB,CAAC;AAwBpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,eAAO,MAAM,sBAAsB,EAAE,cAIpC,CAAC"}
|
|
@@ -21,8 +21,10 @@ import { createPersistenceCachePlugin } from "./provider.js";
|
|
|
21
21
|
* enabled: true,
|
|
22
22
|
* },
|
|
23
23
|
* });
|
|
24
|
+
*
|
|
24
25
|
* // We'll use the Microsoft Graph scope as an example
|
|
25
26
|
* const scope = "https://graph.microsoft.com/.default";
|
|
27
|
+
*
|
|
26
28
|
* // Print out part of the access token
|
|
27
29
|
* console.log((await credential.getToken(scope)).token.substring(0, 10), "...");
|
|
28
30
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAuB7D
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAuB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAmB,CAAC,OAAO,EAAE,EAAE;IAChE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAA6B,CAAC;IAE7D,kBAAkB,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC;AAClE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin, TokenCachePersistenceOptions } from \"@azure/identity\";\nimport { createPersistenceCachePlugin } from \"./provider.js\";\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\ninterface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n/**\n * Context options passed to a plugin during initialization.\n *\n * Represents a subset of the context defined in `@azure/identity`\n *\n */\ninterface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n}\n\n/**\n * A plugin that provides persistent token caching for `@azure/identity`\n * credentials. The plugin API is compatible with `@azure/identity` versions\n * 2.0.0 and later. Load this plugin using the `useIdentityPlugin`\n * function, imported from `@azure/identity`.\n *\n * In order to enable this functionality, you must also pass\n * `tokenCachePersistenceOptions` to your credential constructors with an\n * `enabled` property set to true.\n *\n * Example:\n *\n * ```ts snippet:device_code_credential_example\n * import { DeviceCodeCredential } from \"@azure/identity\";\n *\n * const credential = new DeviceCodeCredential({\n * tokenCachePersistenceOptions: {\n * enabled: true,\n * },\n * });\n *\n * // We'll use the Microsoft Graph scope as an example\n * const scope = \"https://graph.microsoft.com/.default\";\n *\n * // Print out part of the access token\n * console.log((await credential.getToken(scope)).token.substring(0, 10), \"...\");\n * ```\n */\n\nexport const cachePersistencePlugin: IdentityPlugin = (context) => {\n const { cachePluginControl } = context as AzurePluginContext;\n\n cachePluginControl.setPersistence(createPersistenceCachePlugin);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/identity-cache-persistence",
|
|
3
|
-
"version": "1.1.2-alpha.
|
|
3
|
+
"version": "1.1.2-alpha.20250106.1",
|
|
4
4
|
"sdk-type": "client",
|
|
5
5
|
"description": "A secure, persistent token cache for Azure Identity credentials that uses the OS secret-management API",
|
|
6
6
|
"main": "./dist/commonjs/index.js",
|