io.vertx.rxjava.ext.auth.mongo

## Class MongoUserUtil

- java.lang.Object
- - io.vertx.rxjava.ext.auth.mongo.MongoUserUtil

-     public class MongoUserUtil
      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 and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<MongoUserUtil>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoUserUtil(MongoUserUtil delegate)`
    `MongoUserUtil(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MongoUserUtil` | `create(MongoClient client)` Create an instance of the user helper.
    `static MongoUserUtil` | `create(MongoClient client, MongoAuthenticationOptions authenticationOptions, MongoAuthorizationOptions authorizationOptions)` Create an instance of the user helper with custom queries.
    `MongoUserUtil` | `createHashedUser(String username, String hash)` Insert a user into a database.
    `MongoUserUtil` | `createHashedUser(String username, String hash, Handler<AsyncResult<String>> resultHandler)` Insert a user into a database.
    `MongoUserUtil` | `createUser(String username, String password)` Insert a user into a database.
    `MongoUserUtil` | `createUser(String username, String password, Handler<AsyncResult<String>> resultHandler)` Insert a user into a database.
    `MongoUserUtil` | `createUserRolesAndPermissions(String username, List<String> roles, List<String> permissions)` Insert a user role into a database.
    `MongoUserUtil` | `createUserRolesAndPermissions(String username, List<String> roles, List<String> permissions, Handler<AsyncResult<String>> resultHandler)` Insert a user role into a database.
    `boolean` | `equals(Object o)`
    `MongoUserUtil` | `getDelegate()`
    `int` | `hashCode()`
    `static MongoUserUtil` | `newInstance(MongoUserUtil arg)`
    `Single<String>` | `rxCreateHashedUser(String username, String hash)` Insert a user into a database.
    `Single<String>` | `rxCreateUser(String username, String password)` Insert a user into a database.
    `Single<String>` | `rxCreateUserRolesAndPermissions(String username, List<String> roles, List<String> permissions)` 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<MongoUserUtil> __TYPE_ARG

  - ### Constructor Detail

    - #### MongoUserUtil

          public MongoUserUtil(MongoUserUtil delegate)

    - #### MongoUserUtil

          public MongoUserUtil(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 MongoUserUtil getDelegate()

    - #### create

          public static MongoUserUtil create(MongoClient client)

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

    - #### create

          public static MongoUserUtil create(MongoClient client,
                                             MongoAuthenticationOptions authenticationOptions,
                                             MongoAuthorizationOptions authorizationOptions)

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

    - #### createUser

          public MongoUserUtil createUser(String username,
                                          String password,
                                          Handler<AsyncResult<String>> resultHandler)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `password` - the password in clear text, will be adapted following the definitions of the defined strategy
        `resultHandler` - the ResultHandler will be provided with the result of the operation and the created user document identifier
      Returns:
        fluent self

    - #### createUser

          public MongoUserUtil createUser(String username,
                                          String password)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `password` - the password in clear text, will be adapted following the definitions of the defined strategy
      Returns:
        fluent self

    - #### rxCreateUser

          public Single<String> rxCreateUser(String username,
                                             String password)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `password` - the password in clear text, will be adapted following the definitions of the defined strategy
      Returns:
        fluent self

    - #### createHashedUser

          public MongoUserUtil createHashedUser(String username,
                                                String hash,
                                                Handler<AsyncResult<String>> resultHandler)

      Insert a user into a database.
      Parameters:
        `username` - the username to be set
        `hash` - the password hash, as result of `HashingStrategy.hash(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.lang.String, java.lang.String)`
        `resultHandler` - the ResultHandler will be provided with the result of the operation and the created user document identifier
      Returns:
        fluent self

    - #### createHashedUser

          public MongoUserUtil 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 `HashingStrategy.hash(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.lang.String, java.lang.String)`
      Returns:
        fluent self

    - #### rxCreateHashedUser

          public Single<String> 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 `HashingStrategy.hash(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.lang.String, java.lang.String)`
      Returns:
        fluent self

    - #### createUserRolesAndPermissions

          public MongoUserUtil createUserRolesAndPermissions(String username,
                                                             List<String> roles,
                                                             List<String> permissions,
                                                             Handler<AsyncResult<String>> resultHandler)

      Insert a user role into a database.
      Parameters:
        `username` - the username to be set
        `roles` - a to be set
        `permissions` - a to be set
        `resultHandler` - the ResultHandler will be provided with the result of the operation and the created user document identifier
      Returns:
        fluent self

    - #### createUserRolesAndPermissions

          public MongoUserUtil createUserRolesAndPermissions(String username,
                                                             List<String> roles,
                                                             List<String> permissions)

      Insert a user role into a database.
      Parameters:
        `username` - the username to be set
        `roles` - a to be set
        `permissions` - a to be set
      Returns:
        fluent self

    - #### rxCreateUserRolesAndPermissions

          public Single<String> rxCreateUserRolesAndPermissions(String username,
                                                                List<String> roles,
                                                                List<String> permissions)

      Insert a user role into a database.
      Parameters:
        `username` - the username to be set
        `roles` - a to be set
        `permissions` - a to be set
      Returns:
        fluent self

    - #### newInstance

          public static MongoUserUtil newInstance(MongoUserUtil arg)

Copyright © 2024 Eclipse. All rights reserved.