io.vertx.mysqlclient

## 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 Summary

    Constructors
    Constructor and Description
    `MySQLAuthOptions()`
    `MySQLAuthOptions(JsonObject json)`
    `MySQLAuthOptions(MySQLAuthOptions other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MySQLAuthOptions` | `addProperty(String key, String value)` Add a property for this client, which will be sent to server at the re-authentication.
    `String` | `getCharset()` Get the charset for the connection.
    `String` | `getCollation()` Get the collation for the connection.
    `String` | `getDatabase()` Get the database name for the re-authentication.
    `String` | `getPassword()` Get the user password to be used for the authentication.
    `Map<String,String>` | `getProperties()`
    `String` | `getServerRsaPublicKeyPath()` Get the path of the server RSA public key.
    `Buffer` | `getServerRsaPublicKeyValue()` Get the value of the server RSA public key.
    `String` | `getUser()` Get the user account to be used for the authentication.
    `MySQLAuthOptions` | `setCharset(String charset)` Set the charset for the connection.
    `MySQLAuthOptions` | `setCollation(String collation)` Set the collation for the connection.
    `MySQLAuthOptions` | `setDatabase(String database)` Specify the default database for the re-authentication.
    `MySQLAuthOptions` | `setPassword(String password)` Specify the user password to be used for the authentication.
    `MySQLAuthOptions` | `setProperties(Map<String,String> properties)` Set connection attributes which will be sent to server at the re-authentication.
    `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.
    `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.
    `MySQLAuthOptions` | `setUser(String user)` Specify the user account to be used for the authentication.
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MySQLAuthOptions

          public MySQLAuthOptions()

    - #### MySQLAuthOptions

          public MySQLAuthOptions(JsonObject json)

    - #### MySQLAuthOptions

          public MySQLAuthOptions(MySQLAuthOptions other)

  - ### Method Detail

    - #### 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()

Copyright © 2021 Eclipse. All rights reserved.