Class MongoUserUtil
- All Implemented Interfaces:
MutinyDelegate
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMongoUserUtil
(io.vertx.ext.auth.mongo.MongoUserUtil delegate) MongoUserUtil
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoUserUtil
create
(MongoClient client) static MongoUserUtil
create
(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.createHashedUserAndAwait
(String username, String hash) Blocking variant ofcreateHashedUser(String,String)
.createHashedUserAndForget
(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.createUserAndAwait
(String username, String password) Blocking variant ofcreateUser(String,String)
.createUserAndForget
(String username, String password) Variant ofcreateUser(String,String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<String>
Insert a user role into a database.createUserRolesAndPermissionsAndAwait
(String username, List<String> roles, List<String> permissions) Blocking variant ofcreateUserRolesAndPermissions(String,List,List)
.createUserRolesAndPermissionsAndForget
(String username, List<String> roles, List<String> permissions) Variant ofcreateUserRolesAndPermissions(String,List,List)
that ignores the result of the operation.boolean
io.vertx.ext.auth.mongo.MongoUserUtil
int
hashCode()
static MongoUserUtil
newInstance
(io.vertx.ext.auth.mongo.MongoUserUtil arg) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
MongoUserUtil
public MongoUserUtil(io.vertx.ext.auth.mongo.MongoUserUtil delegate) -
MongoUserUtil
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.mongo.MongoUserUtil getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
create
- 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) - Parameters:
client
- the client with write rights to the database.authenticationOptions
-authorizationOptions
-- Returns:
- the 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
. 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:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createUserAndAwait
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 setpassword
- the password in clear text, will be adapted following the definitions of the defined strategy- Returns:
- the String instance produced by the operation.
-
createUserAndForget
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 setpassword
- the password in clear text, will be adapted following the definitions of the defined strategy- Returns:
- the instance of MongoUserUtil to chain method calls.
-
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
. 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(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.lang.String, java.lang.String)
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createHashedUserAndAwait
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 sethash
- the password hash, as result ofHashingStrategy.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.
-
createHashedUserAndForget
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 sethash
- the password hash, as result ofHashingStrategy.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.
-
createUserRolesAndPermissions
@CheckReturnValue public 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 setroles
- a to be setpermissions
- a to be set- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createUserRolesAndPermissionsAndAwait
public String createUserRolesAndPermissionsAndAwait(String username, List<String> roles, List<String> permissions) Blocking variant ofcreateUserRolesAndPermissions(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 setroles
- a to be setpermissions
- a to be set- Returns:
- the String instance produced by the operation.
-
createUserRolesAndPermissionsAndForget
public MongoUserUtil createUserRolesAndPermissionsAndForget(String username, List<String> roles, List<String> permissions) Variant ofcreateUserRolesAndPermissions(String,List,List)
that ignores the result of the operation.This method subscribes on the result of
createUserRolesAndPermissions(String,List,List)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateUserRolesAndPermissions(String,List,List)
but you don't need to compose it with other operations.- Parameters:
username
- the username to be setroles
- a to be setpermissions
- a to be set- Returns:
- the instance of MongoUserUtil to chain method calls.
-
newInstance
-