package ru.micord.ervu.account_applications;

import component.field.persist.TextField;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;

public class PasswordField extends TextField {

  @Autowired
  private PasswordEncoder passwordEncoder;

  @Override
  public String convertValueForSave(String value) {
    return super.convertValueForSave(passwordEncoder.encode(value));
  }
}
