Package io.vertx.mutiny.ext.auth.jdbc
Class JDBCAuth
- java.lang.Object
-
- io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
-
- io.vertx.mutiny.ext.auth.AuthProvider
-
- io.vertx.mutiny.ext.auth.jdbc.JDBCAuth
-
public class JDBCAuth extends AuthProvider
Factory interface for creatingAuthenticationProvider
instances that use the Vert.x JDBC client. By default the hashing strategy is SHA-512. If you're already running in production this is backwards compatible, however for new deployments or security upgrades it is recommended to use the PBKDF2 strategy as it is the current OWASP recommendation for password storage. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<JDBCAuth>
__TYPE_ARG
static String
DEFAULT_AUTHENTICATE_QUERY
The default query to be used for authenticationstatic String
DEFAULT_PERMISSIONS_QUERY
The default query to retrieve all permissions for the rolestatic String
DEFAULT_ROLE_PREFIX
The default role prefixstatic String
DEFAULT_ROLES_QUERY
The default query to retrieve all roles for the user
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
computeHash(String password, String salt)
Deprecated.String
computeHash(String password, String salt, int version)
Deprecated.static JDBCAuth
create(Vertx vertx, JDBCClient client)
Deprecated.boolean
equals(Object o)
String
generateSalt()
Deprecated.io.vertx.ext.auth.jdbc.JDBCAuth
getDelegate()
int
hashCode()
static JDBCAuth
newInstance(io.vertx.ext.auth.jdbc.JDBCAuth arg)
JDBCAuth
setAuthenticationQuery(String authenticationQuery)
Deprecated.JDBCAuth
setNonces(io.vertx.core.json.JsonArray nonces)
Deprecated.JDBCAuth
setPermissionsQuery(String permissionsQuery)
Deprecated.JDBCAuth
setRolePrefix(String rolePrefix)
Deprecated.JDBCAuth
setRolesQuery(String rolesQuery)
Deprecated.String
toString()
-
Methods inherited from class io.vertx.mutiny.ext.auth.AuthProvider
newInstance
-
Methods inherited from class io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
authenticate, authenticate, authenticateAndAwait, authenticateAndAwait, authenticateAndForget, authenticateAndForget, newInstance
-
-
-
-
Field Detail
-
DEFAULT_AUTHENTICATE_QUERY
public static final String DEFAULT_AUTHENTICATE_QUERY
The default query to be used for authentication- See Also:
- Constant Field Values
-
DEFAULT_ROLES_QUERY
public static final String DEFAULT_ROLES_QUERY
The default query to retrieve all roles for the user- See Also:
- Constant Field Values
-
DEFAULT_PERMISSIONS_QUERY
public static final String DEFAULT_PERMISSIONS_QUERY
The default query to retrieve all permissions for the role- See Also:
- Constant Field Values
-
DEFAULT_ROLE_PREFIX
public static final String DEFAULT_ROLE_PREFIX
The default role prefix- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JDBCAuth
public JDBCAuth(io.vertx.ext.auth.jdbc.JDBCAuth delegate)
-
JDBCAuth
public JDBCAuth(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.auth.jdbc.JDBCAuth getDelegate()
- Overrides:
getDelegate
in classAuthProvider
-
toString
public String toString()
- Overrides:
toString
in classAuthProvider
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAuthProvider
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAuthProvider
-
create
@Deprecated public static JDBCAuth create(Vertx vertx, JDBCClient client)
Deprecated.- Parameters:
vertx
-client
- the JDBC client instance- Returns:
- the auth provider
-
setAuthenticationQuery
@Deprecated public JDBCAuth setAuthenticationQuery(String authenticationQuery)
Deprecated.- Parameters:
authenticationQuery
- the authentication query- Returns:
- a reference to this for fluency
-
setRolesQuery
@Deprecated public JDBCAuth setRolesQuery(String rolesQuery)
Deprecated.- Parameters:
rolesQuery
- the roles query- Returns:
- a reference to this for fluency
-
setPermissionsQuery
@Deprecated public JDBCAuth setPermissionsQuery(String permissionsQuery)
Deprecated.- Parameters:
permissionsQuery
- the permissions query- Returns:
- a reference to this for fluency
-
setRolePrefix
@Deprecated public JDBCAuth setRolePrefix(String rolePrefix)
Deprecated.- Parameters:
rolePrefix
- a Prefix e.g.: "role:"- Returns:
- a reference to this for fluency
-
computeHash
@Deprecated public String computeHash(String password, String salt)
Deprecated.- Parameters:
password
- the unhashed passwordsalt
- the salt- Returns:
- the hashed password
-
computeHash
@Deprecated public String computeHash(String password, String salt, int version)
Deprecated.- Parameters:
password
- the unhashed passwordsalt
- the saltversion
- the nonce version to use- Returns:
- the hashed password
-
generateSalt
@Deprecated public String generateSalt()
Deprecated.- Returns:
- a non null salt value
-
setNonces
@Deprecated public JDBCAuth setNonces(io.vertx.core.json.JsonArray nonces)
Deprecated.- Parameters:
nonces
- a List of non null Strings.- Returns:
- a reference to this for fluency
-
newInstance
public static JDBCAuth newInstance(io.vertx.ext.auth.jdbc.JDBCAuth arg)
-
-