Class SqlUserUtil
- java.lang.Object
-
- io.vertx.rxjava.ext.auth.sqlclient.SqlUserUtil
-
public class SqlUserUtil 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 theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<SqlUserUtil>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description SqlUserUtil(SqlUserUtil delegate)
SqlUserUtil(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SqlUserUtil
create(SqlClient client)
Create an instance of the user helper.static SqlUserUtil
create(SqlClient client, String insertUserSQL, String insertUserRoleSQL, String insertRolePermissionSQL)
Create an instance of the user helper with custom queries.SqlUserUtil
createHashedUser(String username, String hash)
Insert a user into a database.SqlUserUtil
createHashedUser(String username, String hash, Handler<AsyncResult<Void>> resultHandler)
Insert a user into a database.SqlUserUtil
createRolePermission(String role, String permission)
Insert a role permission into a database.SqlUserUtil
createRolePermission(String role, String permission, Handler<AsyncResult<Void>> resultHandler)
Insert a role permission into a database.SqlUserUtil
createUser(String username, String password)
Insert a user into a database.SqlUserUtil
createUser(String username, String password, Handler<AsyncResult<Void>> resultHandler)
Insert a user into a database.SqlUserUtil
createUserRole(String username, String role)
Insert a user role into a database.SqlUserUtil
createUserRole(String username, String role, Handler<AsyncResult<Void>> resultHandler)
Insert a user role into a database.boolean
equals(Object o)
SqlUserUtil
getDelegate()
int
hashCode()
static SqlUserUtil
newInstance(SqlUserUtil arg)
rx.Single<Void>
rxCreateHashedUser(String username, String hash)
Insert a user into a database.rx.Single<Void>
rxCreateRolePermission(String role, String permission)
Insert a role permission into a database.rx.Single<Void>
rxCreateUser(String username, String password)
Insert a user into a database.rx.Single<Void>
rxCreateUserRole(String username, String role)
Insert a user role into a database.String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<SqlUserUtil> __TYPE_ARG
-
-
Constructor Detail
-
SqlUserUtil
public SqlUserUtil(SqlUserUtil delegate)
-
SqlUserUtil
public SqlUserUtil(Object delegate)
-
-
Method Detail
-
getDelegate
public SqlUserUtil getDelegate()
-
create
public static SqlUserUtil create(SqlClient client)
Create an instance of the user helper.- Parameters:
client
- the client with write rights to the database.- Returns:
- the instance
-
create
public static SqlUserUtil create(SqlClient client, String insertUserSQL, String insertUserRoleSQL, String insertRolePermissionSQL)
Create an instance of the user helper with custom queries.- Parameters:
client
- the client with write rights to the database.insertUserSQL
-insertUserRoleSQL
-insertRolePermissionSQL
-- Returns:
- the instance
-
createUser
public SqlUserUtil createUser(String username, String password, Handler<AsyncResult<Void>> resultHandler)
Insert a user into a database.- Parameters:
username
- the username to be setpassword
- the passsword in clear text, will be adapted following the definitions of the defined strategyresultHandler
- the ResultHandler will be provided with the result of the operation- Returns:
- fluent self
-
createUser
public SqlUserUtil createUser(String username, String password)
Insert a user into a database.- Parameters:
username
- the username to be setpassword
- the passsword in clear text, will be adapted following the definitions of the defined strategy- Returns:
- fluent self
-
rxCreateUser
public rx.Single<Void> rxCreateUser(String username, String password)
Insert a user into a database.- Parameters:
username
- the username to be setpassword
- the passsword in clear text, will be adapted following the definitions of the defined strategy- Returns:
- fluent self
-
createHashedUser
public SqlUserUtil createHashedUser(String username, String hash, Handler<AsyncResult<Void>> resultHandler)
Insert a user into a database.- 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)
resultHandler
- the ResultHandler will be provided with the result of the operation- Returns:
- fluent self
-
createHashedUser
public SqlUserUtil createHashedUser(String username, String hash)
Insert a user into a database.- 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:
- fluent self
-
rxCreateHashedUser
public rx.Single<Void> rxCreateHashedUser(String username, String hash)
Insert a user into a database.- 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:
- fluent self
-
createUserRole
public SqlUserUtil createUserRole(String username, String role, Handler<AsyncResult<Void>> resultHandler)
Insert a user role into a database.- Parameters:
username
- the username to be setrole
- a to be setresultHandler
- the ResultHandler will be provided with the result of the operation- Returns:
- fluent self
-
createUserRole
public SqlUserUtil createUserRole(String username, String role)
Insert a user role into a database.- Parameters:
username
- the username to be setrole
- a to be set- Returns:
- fluent self
-
rxCreateUserRole
public rx.Single<Void> rxCreateUserRole(String username, String role)
Insert a user role into a database.- Parameters:
username
- the username to be setrole
- a to be set- Returns:
- fluent self
-
createRolePermission
public SqlUserUtil createRolePermission(String role, String permission, Handler<AsyncResult<Void>> resultHandler)
Insert a role permission into a database.- Parameters:
role
- a to be setpermission
- the permission to be setresultHandler
- the ResultHandler will be provided with the result of the operation- Returns:
- fluent self
-
createRolePermission
public SqlUserUtil createRolePermission(String role, String permission)
Insert a role permission into a database.- Parameters:
role
- a to be setpermission
- the permission to be set- Returns:
- fluent self
-
rxCreateRolePermission
public rx.Single<Void> rxCreateRolePermission(String role, String permission)
Insert a role permission into a database.- Parameters:
role
- a to be setpermission
- the permission to be set- Returns:
- fluent self
-
newInstance
public static SqlUserUtil newInstance(SqlUserUtil arg)
-
-