Determines how the hashing is computed in the implementation You can implement this to provide a different hashing strategy to the default.
Constructor and description |
---|
HashStrategy
(java.lang.Object delegate) |
Type | Name and description |
---|---|
java.lang.String |
computeHash(java.lang.String password, User user) Compute the hashed password given the unhashed password and the user |
java.lang.Object |
getDelegate() |
java.lang.String |
getSalt(User user) Retrieve the salt. |
HashSaltStyle |
getSaltStyle() Get the defined io.vertx.groovy.ext.auth.mongo.HashSaltStyle of the current instance |
java.lang.String |
getStoredPwd(User user) Retrieve the password from the user, or as clear text or as hashed version, depending on the definition |
void |
setExternalSalt(java.lang.String salt) Set an external salt. |
void |
setSaltStyle(HashSaltStyle saltStyle) Set the saltstyle as defined by io.vertx.groovy.ext.auth.mongo.HashSaltStyle. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Compute the hashed password given the unhashed password and the user
password
- the unhashed passworduser
- the user to get the salt for. This paramter is needed, if the is declared to be usedRetrieve the salt. The source of the salt can be the external salt or the propriate column of the given user, depending on the defined io.vertx.groovy.ext.auth.mongo.HashSaltStyle
user
- the user to get the salt for. This paramter is needed, if the is declared to be usedGet the defined io.vertx.groovy.ext.auth.mongo.HashSaltStyle of the current instance
Retrieve the password from the user, or as clear text or as hashed version, depending on the definition
user
- the user to get the stored password forSet an external salt. This method should be used in case of
salt
- the salt, which shall be usedSet the saltstyle as defined by io.vertx.groovy.ext.auth.mongo.HashSaltStyle.
saltStyle
- the io.vertx.groovy.ext.auth.mongo.HashSaltStyle to be used