Class 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.

    • Constructor Detail

      • MongoUserUtil

        public MongoUserUtil​(io.vertx.ext.auth.mongo.MongoUserUtil delegate)
      • MongoUserUtil

        public MongoUserUtil​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDelegate

        public io.vertx.ext.auth.mongo.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,
                                           io.vertx.ext.auth.mongo.MongoAuthenticationOptions authenticationOptions,
                                           io.vertx.ext.auth.mongo.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,
                                        io.vertx.core.Handler<io.vertx.core.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 rx.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
      • createUserRolesAndPermissions

        public MongoUserUtil createUserRolesAndPermissions​(String username,
                                                           List<String> roles,
                                                           List<String> permissions,
                                                           io.vertx.core.Handler<io.vertx.core.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 rx.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​(io.vertx.ext.auth.mongo.MongoUserUtil arg)