Skip to content

About

Credentials management utilities shared by the https://www.rabbitmq.com/[RabbitMQ] Java libraries (token refresh, OAuth 2 client credentials support).

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

RabbitMQ Java Credentials

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.

Content

  • 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

Requirements

  • 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.

Maven Coordinates

For RabbitMQ Java libraries maintainers:

<dependency>
    <groupId>com.rabbitmq.client</groupId>
    <artifactId>credentials</artifactId>
    <version>${credentials.version}</version>
</dependency>

Build

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.

About

Credentials management utilities shared by the https://www.rabbitmq.com/[RabbitMQ] Java libraries (token refresh, OAuth 2 client credentials support).

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages