接口 AuthenticationProvider<M extends Message>
-
- 所有已知实现类:
NativeAuthenticationProvider
public interface AuthenticationProvider<M extends Message>
-
-
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidchangeUser(ServerSession serverSession, String userName, String password, String database)Re-authenticates as the given user and passwordvoidconnect(ServerSession serverSession, String userName, String password, String database)static bytegetCharsetForHandshake(String enc, ServerVersion sv)Get the MySQL collation index for the handshake packet.StringgetEncodingForHandshake()voidinit(Protocol<M> prot, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor)
-
-
-
方法详细资料
-
init
void init(Protocol<M> prot, PropertySet propertySet, ExceptionInterceptor exceptionInterceptor)
-
connect
void connect(ServerSession serverSession, String userName, String password, String database)
-
changeUser
void changeUser(ServerSession serverSession, String userName, String password, String database)
Re-authenticates as the given user and password- 参数:
serverSession-ServerSessionobjectuserName- user namepassword- passworddatabase- db name
-
getEncodingForHandshake
String getEncodingForHandshake()
-
getCharsetForHandshake
static byte getCharsetForHandshake(String enc, ServerVersion sv)
Get the MySQL collation index for the handshake packet. A single byte will be added to the packet corresponding to the collation index found for the requested Java encoding name. If the index is > 255 which may be valid at some point in the future, an exception will be thrown. At the time of this implementation the index cannot be > 255 and only the COM_CHANGE_USER rpc, not the handshake response, can handle a value > 255.- 参数:
enc- The Java encoding name used to lookup the collation indexsv- server version- 返回:
- collation index
-
-