类 CachingSha2PasswordPlugin
- java.lang.Object
-
- com.mysql.cj.protocol.a.authentication.Sha256PasswordPlugin
-
- com.mysql.cj.protocol.a.authentication.CachingSha2PasswordPlugin
-
- 所有已实现的接口:
AuthenticationPlugin<NativePacketPayload>
public class CachingSha2PasswordPlugin extends Sha256PasswordPlugin
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classCachingSha2PasswordPlugin.AuthStage
-
字段概要
字段 修饰符和类型 字段 说明 static StringPLUGIN_NAME-
从类继承的字段 com.mysql.cj.protocol.a.authentication.Sha256PasswordPlugin
password, protocol, publicKeyRequested, publicKeyString, seed, serverRSAPublicKeyFile, usernameCallbackHandler
-
-
构造器概要
构造器 构造器 说明 CachingSha2PasswordPlugin()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voiddestroy()Called by the driver when this extension should release any resources it is holding and cleanup internally before the connection is closed.protected byte[]encryptPassword()StringgetProtocolPluginName()Returns the client-side name that the MySQL server uses on the wire for this plugin.voidinit(Protocol<NativePacketPayload> prot)We need direct Protocol reference because it isn't available from Connection before authentication complete.booleannextAuthenticationStep(NativePacketPayload fromServer, List<NativePacketPayload> toServer)Process authentication handshake data from server and optionally produce data to be sent back to the server.voidreset()Resets the authentication steps sequence.-
从类继承的方法 com.mysql.cj.protocol.a.authentication.Sha256PasswordPlugin
encryptPassword, init, isReusable, readRSAKey, requiresConfidentiality, setAuthenticationParameters
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.protocol.AuthenticationPlugin
setSourceOfAuthData
-
-
-
-
字段详细资料
-
PLUGIN_NAME
public static String PLUGIN_NAME
-
-
方法详细资料
-
init
public void init(Protocol<NativePacketPayload> prot)
从接口复制的说明:AuthenticationPluginWe need direct Protocol reference because it isn't available from Connection before authentication complete.- 参数:
prot- protocol instance
-
reset
public void reset()
从接口复制的说明:AuthenticationPluginResets the authentication steps sequence.
-
destroy
public void destroy()
从接口复制的说明:AuthenticationPluginCalled by the driver when this extension should release any resources it is holding and cleanup internally before the connection is closed.- 指定者:
destroy在接口中AuthenticationPlugin<NativePacketPayload>- 覆盖:
destroy在类中Sha256PasswordPlugin
-
getProtocolPluginName
public String getProtocolPluginName()
从接口复制的说明:AuthenticationPluginReturns the client-side name that the MySQL server uses on the wire for this plugin.- 指定者:
getProtocolPluginName在接口中AuthenticationPlugin<NativePacketPayload>- 覆盖:
getProtocolPluginName在类中Sha256PasswordPlugin- 返回:
- plugin name
-
nextAuthenticationStep
public boolean nextAuthenticationStep(NativePacketPayload fromServer, List<NativePacketPayload> toServer)
从接口复制的说明:AuthenticationPluginProcess authentication handshake data from server and optionally produce data to be sent back to the server. The driver will keep calling this method on each new server packet arrival until either an Exception is thrown (authentication failure, please use appropriate SQLStates) or the number of exchange iterations exceeded max limit or an OK packet is sent by server indicating that the connection has been approved. If, on return from this method, toServer is a non-empty list of buffers, then these buffers will be sent to the server in the same order and without any reads in between them. If toServer is an empty list, no data will be sent to server, driver immediately reads the next packet from server. In case of errors the method should throw Exception.- 指定者:
nextAuthenticationStep在接口中AuthenticationPlugin<NativePacketPayload>- 覆盖:
nextAuthenticationStep在类中Sha256PasswordPlugin- 参数:
fromServer- a buffer containing handshake data payload from server (can be empty).toServer- list of buffers with data to be sent to the server (the list can be empty, but buffers in the list should contain data).- 返回:
- return value is ignored.
-
encryptPassword
protected byte[] encryptPassword()
- 覆盖:
encryptPassword在类中Sha256PasswordPlugin
-
-