String pass = getPassword();
String config = getLoginConfig();
char[] password = null;
if (pass != null)
password = pass.toCharArray();
AppCallbackHandler handler = new AppCallbackHandler(username, password);
getLog().debug("Creating LoginContext(" + config + ")");
lc = new LoginContext(config, handler);
lc.login();
getLog().debug("Created LoginContext, subject=" + lc.getSubject());
}