public class CachingSha2PasswordPlugin extends Sha256PasswordPlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
CachingSha2PasswordPlugin.AuthStage |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PLUGIN_NAME |
password, protocol, publicKeyRequested, publicKeyString, seed, serverRSAPublicKeyFile| Constructor and Description |
|---|
CachingSha2PasswordPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
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() |
java.lang.String |
getProtocolPluginName()
Returns the name that the MySQL server uses on
the wire for this plugin
|
void |
init(Protocol<NativePacketPayload> prot)
We need direct Protocol reference because it isn't available from Connection before authentication complete.
|
boolean |
nextAuthenticationStep(NativePacketPayload fromServer,
java.util.List<NativePacketPayload> toServer)
Process authentication handshake data from server and optionally produce data to be sent back to the server.
|
void |
reset()
Resets the authentication steps sequence.
|
encryptPassword, isReusable, readRSAKey, requiresConfidentiality, setAuthenticationParameterspublic void init(Protocol<NativePacketPayload> prot)
AuthenticationPlugininit in interface AuthenticationPlugin<NativePacketPayload>init in class Sha256PasswordPluginprot - protocol instancepublic void reset()
AuthenticationPluginpublic void destroy()
AuthenticationPlugindestroy in interface AuthenticationPlugin<NativePacketPayload>destroy in class Sha256PasswordPluginpublic java.lang.String getProtocolPluginName()
AuthenticationPlugingetProtocolPluginName in interface AuthenticationPlugin<NativePacketPayload>getProtocolPluginName in class Sha256PasswordPluginpublic boolean nextAuthenticationStep(NativePacketPayload fromServer, java.util.List<NativePacketPayload> toServer)
AuthenticationPluginnextAuthenticationStep in interface AuthenticationPlugin<NativePacketPayload>nextAuthenticationStep in class Sha256PasswordPluginfromServer - 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).protected byte[] encryptPassword()
encryptPassword in class Sha256PasswordPlugin