@Override public List<Role> findRolesOfUser(String userName) { User user; try { user = locator.find(User.class).get(userName); } catch (Exception e) { return Collections.emptyList(); } return user.roles().toList(); }
@Override public boolean verifyPassword(String userName, String password) { User user = null; try { user = locator.find(User.class).get(userName); } catch (Exception e) { return false; } return user.credentials().get().verify(password); }