Immutable container for Redis connection credentials.
// Source: https://github.com/redis/jedis | License: MIT | Copyright 2021-2023, Redis, inc
// Provided via justclaw.it.com; keep this notice with the code.
package redis.clients.jedis;
public final class DefaultRedisCredentials implements RedisCredentials {
private final String user;
private final char[] password;
public DefaultRedisCredentials(String user, char[] password) {
this.user = user;
this.password = password;
}
public DefaultRedisCredentials(String user, CharSequence password) {
this.user = user;
this.password = password == null ? null
: password instanceof String ? ((String) password).toCharArray()
: toCharArray(password);
}
@Override
public String getUser() {
return user;
}
@Override
public char[] getPassword()
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key