Class MongoUserUtil
- java.lang.Object
- 
- io.vertx.mutiny.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 theoriginalnon Mutiny-ified interface using Vert.x codegen.
- 
- 
Field SummaryFields Modifier and Type Field Description static TypeArg<MongoUserUtil>__TYPE_ARG
 - 
Constructor SummaryConstructors Constructor Description MongoUserUtil(io.vertx.ext.auth.mongo.MongoUserUtil delegate)MongoUserUtil(Object delegate)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MongoUserUtilcreate(MongoClient client)static MongoUserUtilcreate(MongoClient client, io.vertx.ext.auth.mongo.MongoAuthenticationOptions authenticationOptions, io.vertx.ext.auth.mongo.MongoAuthorizationOptions authorizationOptions)io.smallrye.mutiny.Uni<String>createHashedUser(String username, String hash)Insert a user into a database.StringcreateHashedUserAndAwait(String username, String hash)Blocking variant ofcreateHashedUser(String,String).MongoUserUtilcreateHashedUserAndForget(String username, String hash)Variant ofcreateHashedUser(String,String)that ignores the result of the operation.io.smallrye.mutiny.Uni<String>createUser(String username, String password)Insert a user into a database.StringcreateUserAndAwait(String username, String password)Blocking variant ofcreateUser(String,String).MongoUserUtilcreateUserAndForget(String username, String password)Variant ofcreateUser(String,String)that ignores the result of the operation.io.smallrye.mutiny.Uni<String>createUserRolesAndPermissions(String username, List<String> roles, List<String> permissions)Insert a user role into a database.StringcreateUserRolesAndPermissionsAndAwait(String username, List<String> roles, List<String> permissions)Blocking variant ofio.vertx.mutiny.ext.auth.mongo.MongoUserUtil#createUserRolesAndPermissions(String,List.,List ) MongoUserUtilcreateUserRolesAndPermissionsAndForget(String username, List<String> roles, List<String> permissions)Variant ofio.vertx.mutiny.ext.auth.mongo.MongoUserUtil#createUserRolesAndPermissions(String,Listthat ignores the result of the operation.,List ) booleanequals(Object o)io.vertx.ext.auth.mongo.MongoUserUtilgetDelegate()inthashCode()static MongoUserUtilnewInstance(io.vertx.ext.auth.mongo.MongoUserUtil arg)StringtoString()
 
- 
- 
- 
Field Detail- 
__TYPE_ARGpublic static final TypeArg<MongoUserUtil> __TYPE_ARG 
 
- 
 - 
Constructor Detail- 
MongoUserUtilpublic MongoUserUtil(io.vertx.ext.auth.mongo.MongoUserUtil delegate) 
 - 
MongoUserUtilpublic MongoUserUtil(Object delegate) 
 
- 
 - 
Method Detail- 
getDelegatepublic io.vertx.ext.auth.mongo.MongoUserUtil getDelegate() 
 - 
createpublic static MongoUserUtil create(MongoClient client) - Parameters:
- client- the client with write rights to the database.
- Returns:
- the instance
 
 - 
createpublic static MongoUserUtil create(MongoClient client, io.vertx.ext.auth.mongo.MongoAuthenticationOptions authenticationOptions, io.vertx.ext.auth.mongo.MongoAuthorizationOptions authorizationOptions) - Parameters:
- client- the client with write rights to the database.
- authenticationOptions-
- authorizationOptions-
- Returns:
- the instance
 
 - 
createUserpublic io.smallrye.mutiny.Uni<String> createUser(String username, String password) Insert a user into a database.Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
- username- the username to be set
- password- the passsword in clear text, will be adapted following the definitions of the defined strategy
- Returns:
- the unifiring the result of the operation when completed, or a failure if the operation failed.
 
 - 
createUserAndAwaitpublic String createUserAndAwait(String username, String password) Blocking variant ofcreateUser(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException). - Parameters:
- username- the username to be set
- password- the passsword in clear text, will be adapted following the definitions of the defined strategy
- Returns:
- the String instance produced by the operation.
 
 - 
createUserAndForgetpublic MongoUserUtil createUserAndForget(String username, String password) Variant ofcreateUser(String,String)that ignores the result of the operation.This method subscribes on the result of createUser(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateUser(String,String)but you don't need to compose it with other operations.- Parameters:
- username- the username to be set
- password- the passsword in clear text, will be adapted following the definitions of the defined strategy
- Returns:
- the instance of MongoUserUtil to chain method calls.
 
 - 
createHashedUserpublic io.smallrye.mutiny.Uni<String> createHashedUser(String username, String hash) Insert a user into a database.Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.- 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:
- the unifiring the result of the operation when completed, or a failure if the operation failed.
 
 - 
createHashedUserAndAwaitpublic String createHashedUserAndAwait(String username, String hash) Blocking variant ofcreateHashedUser(String,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException). - 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:
- the String instance produced by the operation.
 
 - 
createHashedUserAndForgetpublic MongoUserUtil createHashedUserAndForget(String username, String hash) Variant ofcreateHashedUser(String,String)that ignores the result of the operation.This method subscribes on the result of createHashedUser(String,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateHashedUser(String,String)but you don't need to compose it with other operations.- 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:
- the instance of MongoUserUtil to chain method calls.
 
 - 
createUserRolesAndPermissionspublic io.smallrye.mutiny.Uni<String> createUserRolesAndPermissions(String username, List<String> roles, List<String> permissions) Insert a user role into a database.Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
- username- the username to be set
- roles- a to be set
- permissions- a to be set
- Returns:
- the unifiring the result of the operation when completed, or a failure if the operation failed.
 
 - 
createUserRolesAndPermissionsAndAwaitpublic String createUserRolesAndPermissionsAndAwait(String username, List<String> roles, List<String> permissions) Blocking variant ofio.vertx.mutiny.ext.auth.mongo.MongoUserUtil#createUserRolesAndPermissions(String,List.,List ) This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException). - Parameters:
- username- the username to be set
- roles- a to be set
- permissions- a to be set
- Returns:
- the String instance produced by the operation.
 
 - 
createUserRolesAndPermissionsAndForgetpublic MongoUserUtil createUserRolesAndPermissionsAndForget(String username, List<String> roles, List<String> permissions) Variant ofio.vertx.mutiny.ext.auth.mongo.MongoUserUtil#createUserRolesAndPermissions(String,Listthat ignores the result of the operation.,List ) This method subscribes on the result of io.vertx.mutiny.ext.auth.mongo.MongoUserUtil#createUserRolesAndPermissions(String,List, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from,List ) io.vertx.mutiny.ext.auth.mongo.MongoUserUtil#createUserRolesAndPermissions(String,Listbut you don't need to compose it with other operations.,List ) - Parameters:
- username- the username to be set
- roles- a to be set
- permissions- a to be set
- Returns:
- the instance of MongoUserUtil to chain method calls.
 
 - 
newInstancepublic static MongoUserUtil newInstance(io.vertx.ext.auth.mongo.MongoUserUtil arg) 
 
- 
 
-