From a5f706aeae5645480a6de4b78d4db135baab3539 Mon Sep 17 00:00:00 2001 From: Igor Malinovskiy Date: Fri, 20 Dec 2024 11:26:56 +0100 Subject: [PATCH] Create README.md (#10) --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a0c3a4 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Token-based Authentication Providers for Redis Java clients + +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. + +## Microsoft Entra ID provider + +### Installation +To install the Java packages, add the following dependencies to your `pom.xml` file if you're using Maven: +```xml + + redis.clients.authentication + redis-authx-entraid + 0.1.1-beta1 + +``` +If you're using Gradle, add the following dependencies to your `build.gradle` file: + +``` +implementation 'redis.clients.authentication:redis-authx-entraid:0.1.1-beta1' +``` + +### Quick Start +Basic usage would look like this: +```java + TokenAuthConfig tokenAuthConfig = EntraIDTokenAuthConfigBuilder.builder() + .clientId("YOUR_CLIENT_ID").secret("YOUR_SECRET") + .authority("YOUR_AUTHORITY").scopes("SCOPES").build(); +``` +With the `tokenAuthConfig` provided, both Jedis and Lettuce clients can automatically handle Reauthentication with EntraID. + +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.