Package org.acemq.amqp.security
Class Credentials
java.lang.Object
org.acemq.amqp.security.Credentials
A username and a secret.
The secret never appears in toString(), and there is no getter that reads like
one. Credentials reach logs, health endpoints, exception messages and crash dumps by way of
some object's toString, and that is how they end up in a log aggregator that half the
company can search.
-
Method Summary
-
Method Details
-
of
- Parameters:
username- the user to connect aspassword- its password- Returns:
- the pair
-
token
A bearer token, as RabbitMQ's OAuth 2 support expects it.- Parameters:
token- the token, which the broker reads as the password- Returns:
- credentials carrying it
-
username
- Returns:
- the user to connect as
-
secret
public char[] secret()- Returns:
- a copy of the secret. A copy, so that a caller clearing its array cannot blank this one, and so that this one's array never escapes
-
toString
-