private boolean checkUserCredentials(final String username, final String password, final boolean isPasswordHash) { boolean allowed = false; final AuthenticationService authenticationService = EnvTool.getAuthenticationService(); if (!isPasswordHash) { allowed = authenticationService.checkUserCredentials(username, password); } else { allowed = authenticationService.checkUserCredentialsWithPasswordHash(username, password); } return allowed; }
@Override public boolean isUserAdmin(final String username) throws UserNotFoundException { final AuthenticationService adminService = EnvTool.getAuthenticationService(); return adminService.isUserAdmin(username); }