Class MySQLAuthOptions

java.lang.Object
io.vertx.mysqlclient.MySQLAuthOptions

public class MySQLAuthOptions extends Object
Authentication options for MySQL authentication which can be used for CHANGE_USER command.
  • Constructor Details

    • MySQLAuthOptions

      public MySQLAuthOptions()
    • MySQLAuthOptions

      public MySQLAuthOptions(JsonObject json)
    • MySQLAuthOptions

      public MySQLAuthOptions(MySQLAuthOptions other)
  • Method Details

    • getUser

      public String getUser()
      Get the user account to be used for the authentication.
      Returns:
      the user
    • setUser

      public MySQLAuthOptions setUser(String user)
      Specify the user account to be used for the authentication.
      Parameters:
      user - the user to specify
      Returns:
      a reference to this, so the API can be used fluently
    • getPassword

      public String getPassword()
      Get the user password to be used for the authentication.
      Returns:
      the password
    • setPassword

      public MySQLAuthOptions setPassword(String password)
      Specify the user password to be used for the authentication.
      Parameters:
      password - the password to specify
      Returns:
      a reference to this, so the API can be used fluently
    • getDatabase

      public String getDatabase()
      Get the database name for the re-authentication.
      Returns:
      the database name
    • setDatabase

      public MySQLAuthOptions setDatabase(String database)
      Specify the default database for the re-authentication.
      Parameters:
      database - the database name to specify
      Returns:
      a reference to this, so the API can be used fluently
    • getProperties

      public Map<String,String> getProperties()
      Returns:
      the value of current connection attributes
    • setProperties

      public MySQLAuthOptions setProperties(Map<String,String> properties)
      Set connection attributes which will be sent to server at the re-authentication.
      Parameters:
      properties - the value of properties to specify
      Returns:
      a reference to this, so the API can be used fluently
    • addProperty

      public MySQLAuthOptions addProperty(String key, String value)
      Add a property for this client, which will be sent to server at the re-authentication.
      Parameters:
      key - the value of property key
      value - the value of property value
      Returns:
      a reference to this, so the API can be used fluently
    • getCollation

      public String getCollation()
      Get the collation for the connection.
      Returns:
      the MySQL collation
    • setCollation

      public MySQLAuthOptions setCollation(String collation)
      Set the collation for the connection.
      Parameters:
      collation - the collation to set
      Returns:
      a reference to this, so the API can be used fluently
    • getCharset

      public String getCharset()
      Get the charset for the connection.
      Returns:
      the MySQL collation
    • setCharset

      public MySQLAuthOptions setCharset(String charset)
      Set the charset for the connection.
      Parameters:
      charset - the charset to set
      Returns:
      a reference to this, so the API can be used fluently
    • getServerRsaPublicKeyPath

      public String getServerRsaPublicKeyPath()
      Get the path of the server RSA public key.
      Returns:
      a reference to this, so the API can be used fluently
    • setServerRsaPublicKeyPath

      public MySQLAuthOptions setServerRsaPublicKeyPath(String serverRsaPublicKeyPath)
      Set the path of server RSA public key which is mostly used for encrypting password under insecure connections when performing authentication.
      Parameters:
      serverRsaPublicKeyPath - the path of the server RSA public key
      Returns:
      a reference to this, so the API can be used fluently
    • getServerRsaPublicKeyValue

      public Buffer getServerRsaPublicKeyValue()
      Get the value of the server RSA public key.
      Returns:
      a reference to this, so the API can be used fluently
    • setServerRsaPublicKeyValue

      public MySQLAuthOptions setServerRsaPublicKeyValue(Buffer serverRsaPublicKeyValue)
      Set the value of server RSA public key which is mostly used for encrypting password under insecure connections when performing authentication.
      Parameters:
      serverRsaPublicKeyValue - the path of the server RSA public key
      Returns:
      a reference to this, so the API can be used fluently
    • toJson

      public JsonObject toJson()