use of com.sun.identity.password.plugins.PasswordGenerator in project OpenAM by OpenRock.
the class UpgradeServices method generateBackupPassword.
private String generateBackupPassword() {
PasswordGenerator passwordGenerator = new RandomPasswordGenerator();
String password = null;
try {
password = passwordGenerator.generatePassword(null);
} catch (PWResetException pre) {
// default implementation will not do this
password = DEFAULT_PASSWORD;
}
return password;
}
use of com.sun.identity.password.plugins.PasswordGenerator in project OpenAM by OpenRock.
the class PWResetQuestionModelImpl method getPasswordResetValue.
private String getPasswordResetValue(String realm, AMIdentity user) {
String password = null;
Object obj = getPluginObject(realm, PW_RESET_OPTION);
try {
if ((obj != null) && (obj instanceof PasswordGenerator)) {
PasswordGenerator pwGenerator = (PasswordGenerator) obj;
password = pwGenerator.generatePassword(user);
}
} catch (PWResetException e) {
debug.error("PWResetQuestionModelImpl.getPasswordResetValue", e);
}
return password;
}
Aggregations