You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
fix (entraid): correct package entry point structure (#2917)
- last time we forgot to include `index.ts`
This commit is contained in:
@@ -39,7 +39,7 @@ The first step to using @redis/entraid is choosing the right credentials provide
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { createClient } from '@redis/client';
|
import { createClient } from '@redis/client';
|
||||||
import { EntraIdCredentialsProviderFactory } from '@redis/entraid/dist/lib';
|
import { EntraIdCredentialsProviderFactory } from '@redis/entraid';
|
||||||
|
|
||||||
const provider = EntraIdCredentialsProviderFactory.createForClientCredentials({
|
const provider = EntraIdCredentialsProviderFactory.createForClientCredentials({
|
||||||
clientId: 'your-client-id',
|
clientId: 'your-client-id',
|
||||||
@@ -86,7 +86,7 @@ const provider = EntraIdCredentialsProviderFactory.createForUserAssignedManagedI
|
|||||||
|
|
||||||
### DefaultAzureCredential Authentication
|
### DefaultAzureCredential Authentication
|
||||||
|
|
||||||
tip: see a real sample here: [samples/interactive-browser/index.ts](./samples/interactive-browser/index.ts)
|
tip: see a real sample here: [samples/interactive-browser/index.ts](./samples/interactive-browser/index.ts)
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ When using the `createForDefaultAzureCredential` method, you need to:
|
|||||||
2. Pass the same parameters to the factory method that you would use with the `getToken()` method:
|
2. Pass the same parameters to the factory method that you would use with the `getToken()` method:
|
||||||
- `scopes`: The Redis scope (use the exported `REDIS_SCOPE_DEFAULT` constant)
|
- `scopes`: The Redis scope (use the exported `REDIS_SCOPE_DEFAULT` constant)
|
||||||
- `options`: Any additional options for the getToken method
|
- `options`: Any additional options for the getToken method
|
||||||
|
|
||||||
This factory method creates a wrapper around DefaultAzureCredential that adapts it to the Redis client's
|
This factory method creates a wrapper around DefaultAzureCredential that adapts it to the Redis client's
|
||||||
authentication system, while maintaining all the flexibility of the original Azure Identity authentication.
|
authentication system, while maintaining all the flexibility of the original Azure Identity authentication.
|
||||||
|
|
||||||
|
@@ -4,7 +4,8 @@
|
|||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./lib/**/*.ts"
|
"./lib/**/*.ts",
|
||||||
|
"./index.ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"./lib/**/*.spec.ts",
|
"./lib/**/*.spec.ts",
|
||||||
|
Reference in New Issue
Block a user