You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/develop/clients/go/amr.md
+44-12Lines changed: 44 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,9 @@ letting `go-redis-entraid` fetch and renew the authentication tokens for you aut
26
26
27
27
## Install
28
28
29
+
Install [`go-redis`]({{< relref "/develop/clients/go" >}}) if you
30
+
have not already done so.
31
+
29
32
From a Go module folder, install `go-redis-entraid` with the
30
33
following command:
31
34
@@ -43,10 +46,10 @@ to create the `StreamingCredentialsProvider` instances for AMR
43
46
using the factory functions that `go-redis-entraid` provides.
44
47
45
48
46
-
### `CredentialProvider` for a service principal
49
+
### `StreamingCredentialsProvider` for a service principal
47
50
48
-
Use the `create_from_service_principal()` factory function to create a
49
-
`CredentialProvider` that authenticates to AMR using a
51
+
Use the `NewConfidentialCredentialsProvider()` factory function to create a
52
+
`StreamingCredentialsProvider` that authenticates to AMR using a
50
53
service principal (see the
51
54
[Microsoft documentation](https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals) to learn more about service principals).
52
55
@@ -56,17 +59,41 @@ You will need the following details of your service principal to make the connec
56
59
- Client secret
57
60
- Tenant ID
58
61
59
-
The example below shows how to import the required modules and call
60
-
`create_from_service_principal()`:
62
+
Use an `AuthorityConfiguration` instance to pass the tenant ID.
63
+
This type has the following fields:
61
64
62
-
```python
63
-
from redis import Redis
64
-
from redis_entraid.cred_provider import*
65
+
-`AuthorityType`: This should have one of the values
0 commit comments