类 NativeAuthenticationProvider
- java.lang.Object
-
- com.mysql.cj.protocol.a.NativeAuthenticationProvider
-
- 所有已实现的接口:
AuthenticationProvider<NativePacketPayload>
public class NativeAuthenticationProvider extends Object implements AuthenticationProvider<NativePacketPayload>
-
-
字段概要
字段 修饰符和类型 字段 说明 protected static intAUTH_411_OVERHEADprotected Stringseed
-
构造器概要
构造器 构造器 说明 NativeAuthenticationProvider()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidchangeUser(ServerSession serverSession, String userName, String password, String database)Re-authenticates as the given user and passwordvoidconnect(ServerSession sessState, String user, String password, String database)Initialize communications with the MySQL server.StringgetEncodingForHandshake()Get the Java encoding to be used for the handshake response.ExceptionInterceptorgetExceptionInterceptor()voidinit(Protocol<NativePacketPayload> prot, PropertySet propSet, ExceptionInterceptor excInterceptor)
-
-
-
方法详细资料
-
init
public void init(Protocol<NativePacketPayload> prot, PropertySet propSet, ExceptionInterceptor excInterceptor)
- 指定者:
init在接口中AuthenticationProvider<NativePacketPayload>
-
connect
public void connect(ServerSession sessState, String user, String password, String database)
Initialize communications with the MySQL server. Handles logging on, and handling initial connection errors.- 指定者:
connect在接口中AuthenticationProvider<NativePacketPayload>- 参数:
sessState- The session state object. It's intended to be updated from the handshakeuser- user namepassword- passworddatabase- database name
-
getEncodingForHandshake
public String getEncodingForHandshake()
Get the Java encoding to be used for the handshake response. Defaults to UTF-8.- 指定者:
getEncodingForHandshake在接口中AuthenticationProvider<NativePacketPayload>- 返回:
- encoding name
-
getExceptionInterceptor
public ExceptionInterceptor getExceptionInterceptor()
-
changeUser
public void changeUser(ServerSession serverSession, String userName, String password, String database)
Re-authenticates as the given user and password- 指定者:
changeUser在接口中AuthenticationProvider<NativePacketPayload>- 参数:
serverSession- currentServerSessionuserName- user namepassword- passworddatabase- database name
-
-