Package io.vertx.reactivex.ext.auth.sqlclient

## Class SqlUserUtil

- java.lang.Object
- - io.vertx.reactivex.ext.auth.sqlclient.SqlUserUtil

-     public class SqlUserUtil
      extends Object

  Utility to create users/roles/permissions. This is a helper class and not intended to be a full user management utility. While the standard authentication and authorization interfaces will require usually read only access to the database, in order to use this API a full read/write access must be granted.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<SqlUserUtil>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SqlUserUtil​(SqlUserUtil delegate)` |
    `SqlUserUtil​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SqlUserUtil` | `create​(SqlClient client)` | Create an instance of the user helper.
    `static SqlUserUtil` | `create​(SqlClient client, String insertUserSQL, String insertUserRoleSQL, String insertRolePermissionSQL)` | Create an instance of the user helper with custom queries.
    `Future<Void>` | `createHashedUser​(String username, String hash)` | Insert a user into a database.
    `Future<Void>` | `createRolePermission​(String role, String permission)` | Insert a role permission into a database.
    `Future<Void>` | `createUser​(String username, String password)` | Insert a user into a database.
    `Future<Void>` | `createUserRole​(String username, String role)` | Insert a user role into a database.
    `boolean` | `equals​(Object o)` |
    `SqlUserUtil` | `getDelegate()` |
    `int` | `hashCode()` |
    `static SqlUserUtil` | `newInstance​(SqlUserUtil arg)` |
    `Completable` | `rxCreateHashedUser​(String username, String hash)` | Insert a user into a database.
    `Completable` | `rxCreateRolePermission​(String role, String permission)` | Insert a role permission into a database.
    `Completable` | `rxCreateUser​(String username, String password)` | Insert a user into a database.
    `Completable` | `rxCreateUserRole​(String username, String role)` | Insert a user role into a database.
    `String` | `toString()` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<SqlUserUtil> __TYPE_ARG

  - ### Constructor Detail

    - #### SqlUserUtil

          public SqlUserUtil​(SqlUserUtil delegate)

    - #### SqlUserUtil

          public SqlUserUtil​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public SqlUserUtil getDelegate()

    - #### create

          public static SqlUserUtil create​(SqlClient client)

      Create an instance of the user helper.
      Parameters:
        `client` - the client with write rights to the database.
      Returns:
        the instance

    - #### create

          public static SqlUserUtil create​(SqlClient client,
                                           String insertUserSQL,
                                           String insertUserRoleSQL,
                                           String insertRolePermissionSQL)

      Create an instance of the user helper with custom queries.
      Parameters:
        `client` - the client with write rights to the database.
        `insertUserSQL` -
        `insertUserRoleSQL` -
        `insertRolePermissionSQL` -
      Returns:
        the instance

    - #### createUser

          public Future<Void> createUser​(String username,
                                         String password)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `password` - the passsword in clear text, will be adapted following the definitions of the defined strategy
      Returns:
        a future notified with the result of the operation

    - #### rxCreateUser

          public Completable rxCreateUser​(String username,
                                          String password)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `password` - the passsword in clear text, will be adapted following the definitions of the defined strategy
      Returns:
        a future notified with the result of the operation

    - #### createHashedUser

          public Future<Void> createHashedUser​(String username,
                                               String hash)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `hash` - the password hash, as result of
      Returns:
        a future notified with the result of the operation

    - #### rxCreateHashedUser

          public Completable rxCreateHashedUser​(String username,
                                                String hash)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `hash` - the password hash, as result of
      Returns:
        a future notified with the result of the operation

    - #### createUserRole

          public Future<Void> createUserRole​(String username,
                                             String role)

      Insert a user role into a database.
      Parameters:
        `username` - the username to be set
        `role` - a to be set
      Returns:
        a future notified with the result of the operation

    - #### rxCreateUserRole

          public Completable rxCreateUserRole​(String username,
                                              String role)

      Insert a user role into a database.
      Parameters:
        `username` - the username to be set
        `role` - a to be set
      Returns:
        a future notified with the result of the operation

    - #### createRolePermission

          public Future<Void> createRolePermission​(String role,
                                                   String permission)

      Insert a role permission into a database.
      Parameters:
        `role` - a to be set
        `permission` - the permission to be set
      Returns:
        a future notified with the result of the operation

    - #### rxCreateRolePermission

          public Completable rxCreateRolePermission​(String role,
                                                    String permission)

      Insert a role permission into a database.
      Parameters:
        `role` - a to be set
        `permission` - the permission to be set
      Returns:
        a future notified with the result of the operation

    - #### newInstance

          public static SqlUserUtil newInstance​(SqlUserUtil arg)