Credentials management utilities shared by the RabbitMQ Java libraries (token refresh, OAuth 2 client credentials support).
|
Important
|
This library is meant to be used only by the RabbitMQ Java libraries (e.g. the RabbitMQ AMQP 1.0 Java client and the RabbitMQ stream Java client). Its API is not public and not considered stable: it can change in any release without notice. Applications must not depend on it directly, and should use the credentials settings of the RabbitMQ Java client they use instead. |
-
com.rabbitmq.client.credentials: credentials manager contract and token refresh -
com.rabbitmq.client.credentials.oauth2: OAuth 2 token requests over HTTP(S) and token response parsing
-
Java 8 or later
-
Gson for the
GsonTokenParser
Gson is a transitive dependency, so OAuth 2 support works without adding any dependency.
It is needed only for OAuth 2 and can be excluded otherwise: creating a GsonTokenParser fails with an IllegalStateException if Gson is not on the classpath.
The library uses only long-standing Gson APIs, so it works with the Gson version an application may already use.
For RabbitMQ Java libraries maintainers:
<dependency>
<groupId>com.rabbitmq.client</groupId>
<artifactId>credentials</artifactId>
<version>${credentials.version}</version>
</dependency>To build and run the tests (no external service needed):
./mvnw clean verify
The project uses the Google Java Format. Format the code before committing (requires JDK 17 or later):
./mvnw spotless:apply
(c) 2024-2026 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
This package, the RabbitMQ Java Credentials library, is licensed under the Apache License, version 2.