/** whether user is authorized? */ public boolean isAuthorized() { if (!useConfiguredFileAuth) { return true; } Set privateCredList = subject.getPrivateCredentials(); String userName = user.getName(); String userPassword = null; if ((userName == null) || (privateCredList == null)) { return false; } userPassword = getPassword(); try { String correctPassword = groups.getPassword(user.getName()); if ((correctPassword != null) && (correctPassword.equals(userPassword))) { return true; } } catch (Exception e) { e.printStackTrace(); } return false; }