@redis/entraid 5.0.0-next.7 → 5.0.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 +7 -7
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ Secure token-based authentication for Redis clients using Microsoft Entra ID (fo
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npm install "@redis/client@5.0.0-next.
|
|
22
|
-
npm install "@redis/entraid@5.0.0-next.
|
|
21
|
+
npm install "@redis/client@5.0.0-next.7"
|
|
22
|
+
npm install "@redis/entraid@5.0.0-next.7"
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Getting Started
|
|
@@ -86,17 +86,17 @@ const provider = EntraIdCredentialsProviderFactory.createForUserAssignedManagedI
|
|
|
86
86
|
|
|
87
87
|
### DefaultAzureCredential Authentication
|
|
88
88
|
|
|
89
|
-
tip: see a real sample here: [samples/interactive-browser/index.ts](./samples/interactive-browser/index.ts)
|
|
89
|
+
tip: see a real sample here: [samples/interactive-browser/index.ts](./samples/interactive-browser/index.ts)
|
|
90
90
|
|
|
91
91
|
The DefaultAzureCredential from @azure/identity provides a simplified authentication experience that automatically tries different authentication methods based on the environment. This is especially useful for applications that need to work in different environments (local development, CI/CD, and production).
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
94
|
import { createClient } from '@redis/client';
|
|
95
|
-
import {
|
|
96
|
-
import { EntraIdCredentialsProviderFactory, REDIS_SCOPE_DEFAULT } from '@redis/entraid
|
|
95
|
+
import { getDefaultAzureCredential } from '@azure/identity';
|
|
96
|
+
import { EntraIdCredentialsProviderFactory, REDIS_SCOPE_DEFAULT } from '@redis/entraid';
|
|
97
97
|
|
|
98
98
|
// Create a DefaultAzureCredential instance
|
|
99
|
-
const credential =
|
|
99
|
+
const credential = getDefaultAzureCredential();
|
|
100
100
|
|
|
101
101
|
// Create a provider using DefaultAzureCredential
|
|
102
102
|
const provider = EntraIdCredentialsProviderFactory.createForDefaultAzureCredential({
|
|
@@ -128,7 +128,7 @@ When using the `createForDefaultAzureCredential` method, you need to:
|
|
|
128
128
|
2. Pass the same parameters to the factory method that you would use with the `getToken()` method:
|
|
129
129
|
- `scopes`: The Redis scope (use the exported `REDIS_SCOPE_DEFAULT` constant)
|
|
130
130
|
- `options`: Any additional options for the getToken method
|
|
131
|
-
|
|
131
|
+
|
|
132
132
|
This factory method creates a wrapper around DefaultAzureCredential that adapts it to the Redis client's
|
|
133
133
|
authentication system, while maintaining all the flexibility of the original Azure Identity authentication.
|
|
134
134
|
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib/index"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redis/entraid",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"test": "nyc -r text-summary -r lcov mocha -r tsx './lib/**/*.spec.ts'"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@azure/identity": "4.7.0",
|
|
20
|
+
"@azure/identity": "^4.7.0",
|
|
21
21
|
"@azure/msal-node": "^2.16.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@redis/client": "^5.0.
|
|
24
|
+
"@redis/client": "^5.0.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/express": "^4.17.21",
|