Class MongoUserUtil
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
MongoUserUtil
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMongoUserUtil(io.vertx.ext.auth.mongo.MongoUserUtil delegate) Create a new instance ofMongoUserUtildelegating to the given (non-null) instance ofMongoUserUtil.MongoUserUtil(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoUserUtilcreate(MongoClient client) Create an instance of the user helper.static MongoUserUtilcreate(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.io.smallrye.mutiny.Uni<String>createHashedUser(String username, String hash) Insert a user into a database.createHashedUserAndAwait(String username, String hash) Insert a user into a database.createHashedUserAndForget(String username, String hash) Insert a user into a database.io.smallrye.mutiny.Uni<String>createUser(String username, String password) Insert a user into a database.createUserAndAwait(String username, String password) Insert a user into a database.createUserAndForget(String username, String password) Insert a user into a database.io.smallrye.mutiny.Uni<String>Insert a user role into a database.Insert a user role into a database.Insert a user role into a database.booleanio.vertx.ext.auth.mongo.MongoUserUtilGet the delegate instance.inthashCode()static MongoUserUtilnewInstance(io.vertx.ext.auth.mongo.MongoUserUtil delegate) Creates a new instance of theMongoUserUtil.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
MongoUserUtil
public MongoUserUtil(io.vertx.ext.auth.mongo.MongoUserUtil delegate) Create a new instance ofMongoUserUtildelegating to the given (non-null) instance ofMongoUserUtil. -
MongoUserUtil
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.mongo.MongoUserUtil getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
createUser
@CheckReturnValue public 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
username- the username to be setpassword- the password in clear text, will be adapted following the definitions of the defined strategy- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoUserUtil.createUser(String, String)
-
createUserAndAwait
Insert a user into a database.Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely 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 aRuntimeException).- Parameters:
username- the username to be setpassword- the password in clear text, will be adapted following the definitions of the defined strategy- Returns:
- The operation result
- See Also:
-
MongoUserUtil.createUser(String, String)
-
createUserAndForget
Insert a user into a database.Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
username- the username to be setpassword- the password in clear text, will be adapted following the definitions of the defined strategy- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoUserUtil.createUser(String, String)
-
createHashedUser
@CheckReturnValue public 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
username- the username to be sethash- the password hash, as result ofHashingStrategy.hash(String, Map, String, String)- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoUserUtil.createHashedUser(String, String)
-
createHashedUserAndAwait
Insert a user into a database.Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely 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 aRuntimeException).- Parameters:
username- the username to be sethash- the password hash, as result ofHashingStrategy.hash(String, Map, String, String)- Returns:
- The operation result
- See Also:
-
MongoUserUtil.createHashedUser(String, String)
-
createHashedUserAndForget
Insert a user into a database.Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
username- the username to be sethash- the password hash, as result ofHashingStrategy.hash(String, Map, String, String)- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoUserUtil.createHashedUser(String, String)
-
createUserRolesAndPermissions
@CheckReturnValue public io.smallrye.mutiny.Uni<String> createUserRolesAndPermissions(String user, List<String> roles, List<String> permissions) Insert a user role into a database.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
user- the username to be setroles- a to be setpermissions- a to be set- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoUserUtil.createUserRolesAndPermissions(String, List, List)
-
createUserRolesAndPermissionsAndAwait
public String createUserRolesAndPermissionsAndAwait(String user, List<String> roles, List<String> permissions) Insert a user role into a database.Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely 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 aRuntimeException).- Parameters:
user- the username to be setroles- a to be setpermissions- a to be set- Returns:
- The operation result
- See Also:
-
MongoUserUtil.createUserRolesAndPermissions(String, List, List)
-
createUserRolesAndPermissionsAndForget
public MongoUserUtil createUserRolesAndPermissionsAndForget(String user, List<String> roles, List<String> permissions) Insert a user role into a database.Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
user- the username to be setroles- a to be setpermissions- a to be set- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoUserUtil.createUserRolesAndPermissions(String, List, List)
-
create
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.- Returns:
- the instance
-
newInstance
Creates a new instance of theMongoUserUtil. -
hashCode
public int hashCode() -
equals
-
toString
-