Package net.rubyeye.xmemcached.auth
Class AuthInfo
java.lang.Object
net.rubyeye.xmemcached.auth.AuthInfo
Authentication infomation for a memcached server
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private final CallbackHandler
private final int
private final String[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthInfo
Get a typical auth descriptor for CRAM-MD5 auth with the given username and password.int
String[]
void
boolean
boolean
isValid()
static AuthInfo
Get a typical auth descriptor for PLAIN auth with the given username and password.static AuthInfo
Get a typical auth descriptor for CRAM-MD5 or PLAIN auth with the given username and password.
-
Field Details
-
callbackHandler
-
mechanisms
-
maxAttempts
private final int maxAttempts -
attempts
private int attempts
-
-
Constructor Details
-
AuthInfo
-
-
Method Details
-
isValid
public boolean isValid() -
isFirstTime
public boolean isFirstTime() -
increaseAttempts
public void increaseAttempts() -
getMaxAttempts
public int getMaxAttempts() -
plain
Get a typical auth descriptor for PLAIN auth with the given username and password.- Parameters:
u
- the usernamep
- the password- Returns:
- an AuthInfo
-
cramMD5
Get a typical auth descriptor for CRAM-MD5 auth with the given username and password.- Parameters:
u
- the usernamep
- the password- Returns:
- an AuthInfo
-
typical
Get a typical auth descriptor for CRAM-MD5 or PLAIN auth with the given username and password.- Parameters:
u
- the usernamep
- the password- Returns:
- an AuthInfo
-
getCallbackHandler
-
getMechanisms
-