use of com.bakdata.conquery.models.auth.basic.PasswordHasher.HashedEntry in project conquery by bakdata.
the class LocalAuthenticationRealm method updateUser.
@Override
public boolean updateUser(User user, List<CredentialType> credentials) {
Optional<PasswordCredential> optPassword = getTypePassword(credentials);
if (optPassword.isEmpty()) {
log.trace("No password credential provided. Not adding {} to {}", user.getName(), getName());
return false;
}
HashedEntry passwordByteIt = optPassword.map(LocalAuthenticationRealm::passwordToHashedEntry).get();
passwordStore.update(user.getId(), passwordByteIt);
return true;
}
use of com.bakdata.conquery.models.auth.basic.PasswordHasher.HashedEntry in project conquery by bakdata.
the class LocalAuthenticationRealm method addUser.
// ////////////////// USER MANAGEMENT ////////////////////
@Override
public boolean addUser(User user, List<CredentialType> credentials) {
Optional<PasswordCredential> optPassword = getTypePassword(credentials);
if (optPassword.isEmpty()) {
log.trace("No password credential provided. Not adding {} to {}", user.getName(), getName());
return false;
}
HashedEntry passwordByteIt = optPassword.map(LocalAuthenticationRealm::passwordToHashedEntry).get();
passwordStore.add(user.getId(), passwordByteIt);
return true;
}
Aggregations