public FileBasedUserManager(File storeFile, StoreType storeType) throws IOException { this.storeFile = checkNotNull(storeFile, "Argument [storeFile] may not be null"); this.storeType = checkNotNull(storeType, "Argument [storeType] may not be null"); loadFromFile(); }
@Override public User check(String username, String password) { User user = find(username); if (user != null && user.getPassword() != null && user.getPassword().equals(password)) { return user; } return null; }
@Override public User check(String username, String password) { User user = find(username); if (user != null && user.getPassword() != null && user.getPassword().equals(password)) { return user; } return null; }
public FileBasedUserManager(File storeFile, StoreType storeType) throws IOException { this.storeFile = checkNotNull(storeFile, "Argument [storeFile] may not be null"); this.storeType = checkNotNull(storeType, "Argument [storeType] may not be null"); loadFromFile(); }
public FileBasedUserManager(String storeFile, boolean autoReload, long reloadAfter) throws IOException { storeFile = PathUtil.getAbstractPath(storeFile); this.storeFile = new File(storeFile); this.autoReload = autoReload; this.reloadAfter = reloadAfter; loadFromFile(); if (this.autoReload) { autoReloadService = new AutoReloadService(this.reloadAfter); autoReloadService.start(); } }
public FileBasedUserManager(String storeFile, boolean autoReload, long reloadAfter) throws IOException { storeFile = PathUtil.getAbstractPath(storeFile); this.storeFile = new File(storeFile); this.autoReload = autoReload; this.reloadAfter = reloadAfter; loadFromFile(); if (this.autoReload) { autoReloadService = new AutoReloadService(this.reloadAfter); autoReloadService.start(); } }