Package net.rubyeye.xmemcached.auth
Class AuthInfo
- java.lang.Object
-
- net.rubyeye.xmemcached.auth.AuthInfo
-
public class AuthInfo extends Object
Authentication infomation for a memcached server- Author:
- dennis
-
-
Constructor Summary
Constructors Constructor Description AuthInfo(CallbackHandler callbackHandler, String[] mechanisms)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthInfocramMD5(String username, String password)Get a typical auth descriptor for CRAM-MD5 auth with the given username and password.CallbackHandlergetCallbackHandler()intgetMaxAttempts()String[]getMechanisms()voidincreaseAttempts()booleanisFirstTime()booleanisValid()static AuthInfoplain(String username, String password)Get a typical auth descriptor for PLAIN auth with the given username and password.static AuthInfotypical(String username, String password)Get a typical auth descriptor for CRAM-MD5 or PLAIN auth with the given username and password.
-
-
-
Constructor Detail
-
AuthInfo
public AuthInfo(CallbackHandler callbackHandler, String[] mechanisms)
-
-
Method Detail
-
isValid
public boolean isValid()
-
isFirstTime
public boolean isFirstTime()
-
increaseAttempts
public void increaseAttempts()
-
getMaxAttempts
public int getMaxAttempts()
-
plain
public static AuthInfo plain(String username, String password)
Get a typical auth descriptor for PLAIN auth with the given username and password.- Parameters:
u- the usernamep- the password- Returns:
- an AuthInfo
-
cramMD5
public static AuthInfo cramMD5(String username, String password)
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
public static AuthInfo typical(String username, String password)
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
public CallbackHandler getCallbackHandler()
-
getMechanisms
public String[] getMechanisms()
-
-