Class: JDBCAuth

vertx-auth-jdbc-js/jdbc_auth~ JDBCAuth

new JDBCAuth()

Source:

Methods

authenticate(arg0, arg1)

Parameters:
Name Type Description
arg0 Object
arg1 function
Source:

computeHash(password, salt, version) → {string}

Compute the hashed password given the unhashed password and the salt The implementation relays to the JDBCHashStrategy provided.
Parameters:
Name Type Description
password string the unhashed password
salt string the salt
version number the nonce version to use
Source:
Returns:
the hashed password
Type
string

generateSalt() → {string}

Compute a salt string. The implementation relays to the JDBCHashStrategy provided.
Source:
Returns:
a non null salt value
Type
string

setAuthenticationQuery(authenticationQuery) → {JDBCAuth}

Set the authentication query to use. Use this if you want to override the default authentication query.
Parameters:
Name Type Description
authenticationQuery string the authentication query
Source:
Returns:
a reference to this for fluency
Type
JDBCAuth

setNonces(nonces) → {JDBCAuth}

Provide a application configuration level on hash nonce's as a ordered list of nonces where each position corresponds to a version. The nonces are supposed not to be stored in the underlying jdbc storage but to be provided as a application configuration. The idea is to add one extra variable to the hash function in order to make breaking the passwords using rainbow tables or precomputed hashes harder. Leaving the attacker only with the brute force approach. The implementation relays to the JDBCHashStrategy provided.
Parameters:
Name Type Description
nonces todo a List of non null Strings.
Source:
Returns:
a reference to this for fluency
Type
JDBCAuth

setPermissionsQuery(permissionsQuery) → {JDBCAuth}

Set the permissions query to use. Use this if you want to override the default permissions query.
Parameters:
Name Type Description
permissionsQuery string the permissions query
Source:
Returns:
a reference to this for fluency
Type
JDBCAuth

setRolePrefix(rolePrefix) → {JDBCAuth}

Set the role prefix to distinguish from permissions when checking for isPermitted requests.
Parameters:
Name Type Description
rolePrefix string a Prefix e.g.: "role:"
Source:
Returns:
a reference to this for fluency
Type
JDBCAuth

setRolesQuery(rolesQuery) → {JDBCAuth}

Set the roles query to use. Use this if you want to override the default roles query.
Parameters:
Name Type Description
rolesQuery string the roles query
Source:
Returns:
a reference to this for fluency
Type
JDBCAuth