Skip to content

Commit a5f706a

Browse files
authored
Create README.md (#10)
1 parent 806cdad commit a5f706a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Token-based Authentication Providers for Redis Java clients
2+
3+
This extension provides Token-based Authentication for Redis Java client libraries([lettuce](https://github.com/redis/lettuce) and [Jedis](https://github.com/redis/jedis)) to support token-based authentication.
4+
5+
## Microsoft Entra ID provider
6+
7+
### Installation
8+
To install the Java packages, add the following dependencies to your `pom.xml` file if you're using Maven:
9+
```xml
10+
<dependency>
11+
<groupId>redis.clients.authentication</groupId>
12+
<artifactId>redis-authx-entraid</artifactId>
13+
<version>0.1.1-beta1</version>
14+
</dependency>
15+
```
16+
If you're using Gradle, add the following dependencies to your `build.gradle` file:
17+
18+
```
19+
implementation 'redis.clients.authentication:redis-authx-entraid:0.1.1-beta1'
20+
```
21+
22+
### Quick Start
23+
Basic usage would look like this:
24+
```java
25+
TokenAuthConfig tokenAuthConfig = EntraIDTokenAuthConfigBuilder.builder()
26+
.clientId("YOUR_CLIENT_ID").secret("YOUR_SECRET")
27+
.authority("YOUR_AUTHORITY").scopes("SCOPES").build();
28+
```
29+
With the `tokenAuthConfig` provided, both Jedis and Lettuce clients can automatically handle Reauthentication with EntraID.
30+
31+
Refer to the [test files](https://github.com/redis/tbd-auth-entraid/tree/main/entraid/src/test/java/redis/clients/authentication) for more examples and detailed usage.

0 commit comments

Comments
 (0)