password = FnCredentialMap.getUserCred(username);
}
}
if (password == null) {
logger.log(Level.WARNING, "Password is NULL");
throw new RepositoryLoginException();
}
UserContext uc = UserContext.get();
try {
Subject s = UserContext.createSubject(
((FnConnection) conn).getConnection(), username, password,
"FileNetP8");
uc.pushSubject(s);
User u = Factory.User.fetchCurrent(((FnConnection) conn).getConnection(),
null);
logger.info("User: " + u.get_Name() + " is authenticated");
FnCredentialMap.putUserCred(username, password);
return new FnUser(u);
} catch (Throwable e) {
logger.log(Level.WARNING,
"Unable to GET connection or user is not authenticated");
throw new RepositoryLoginException(e);
}
}