Class Sha256PasswordPluginFlow
- java.lang.Object
-
- org.mariadb.r2dbc.authentication.standard.Sha256PasswordPluginFlow
-
- All Implemented Interfaces:
AuthenticationPlugin
- Direct Known Subclasses:
CachingSha2PasswordFlow
public class Sha256PasswordPluginFlow extends Object implements AuthenticationPlugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSha256PasswordPluginFlow.State
-
Constructor Summary
Constructors Constructor Description Sha256PasswordPluginFlow()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Sha256PasswordPluginFlowcreate()static PublicKeygeneratePublicKey(byte[] publicKeyBytes)Read public pem key from String.ClientMessagenext(MariadbConnectionConfiguration configuration, byte[] seed, Sequencer sequencer, AuthMoreData authMoreData)static PublicKeyreadPublicKey(io.netty.buffer.ByteBuf buf)Read public Keystatic PublicKeyreadPublicKeyFromFile(String serverRsaPublicKeyFile)Read public Key from file.Stringtype()
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
readPublicKeyFromFile
public static PublicKey readPublicKeyFromFile(String serverRsaPublicKeyFile) throws io.r2dbc.spi.R2dbcException
Read public Key from file.- Parameters:
serverRsaPublicKeyFile- RSA public key file- Returns:
- public key
- Throws:
io.r2dbc.spi.R2dbcException- if cannot read file or file content is not a public key.
-
generatePublicKey
public static PublicKey generatePublicKey(byte[] publicKeyBytes) throws io.r2dbc.spi.R2dbcException
Read public pem key from String.- Parameters:
publicKeyBytes- public key bytes value- Returns:
- public key
- Throws:
io.r2dbc.spi.R2dbcException- if key cannot be parsed
-
readPublicKey
public static PublicKey readPublicKey(io.netty.buffer.ByteBuf buf) throws io.r2dbc.spi.R2dbcException
Read public Key- Parameters:
buf- more data buffer- Returns:
- public key
- Throws:
io.r2dbc.spi.R2dbcException- if server return an Error packet or public key cannot be parsed.
-
create
public Sha256PasswordPluginFlow create()
- Specified by:
createin interfaceAuthenticationPlugin
-
type
public String type()
- Specified by:
typein interfaceAuthenticationPlugin
-
next
public ClientMessage next(MariadbConnectionConfiguration configuration, byte[] seed, Sequencer sequencer, AuthMoreData authMoreData) throws io.r2dbc.spi.R2dbcException
- Specified by:
nextin interfaceAuthenticationPlugin- Throws:
io.r2dbc.spi.R2dbcException
-
-