final class StringAuthentication extends java.lang.Object implements Authentication
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key |
private java.lang.String |
value |
Constructor and Description |
---|
StringAuthentication(java.lang.String key,
java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
void |
digest(AuthenticationDigest digest)
Updates the given digest with data from this authentication callback.
|
private static <T> boolean |
eq(T s1,
T s2) |
boolean |
equals(java.lang.Object obj) |
void |
fill(AuthenticationContext context,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> data)
Fills the given authentication context with the data from this authentication callback.
|
int |
hashCode() |
java.lang.String |
toString() |
StringAuthentication(java.lang.String key, java.lang.String value)
public void fill(AuthenticationContext context, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> data)
Authentication
AuthenticationContext.put(String, Object)
. key
parameter supplied to this method acts merely as a hint for interactive callbacks that want to
prompt the user for only that authentication data which is required. Implementations are free to ignore this
parameter and put all the data they have into the authentication context at once.fill
in interface Authentication
context
- The authentication context to populate, must not be null
.key
- The key denoting a specific piece of authentication data that is being requested for a network
operation, may be null
.data
- Any (read-only) extra data in form of key value pairs that might be useful when getting the
authentication data, may be null
.public void digest(AuthenticationDigest digest)
Authentication
update()
methods in AuthenticationDigest
.digest
in interface Authentication
digest
- The digest to update, must not be null
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
private static <T> boolean eq(T s1, T s2)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object