return doc;
}
protected Element getAuthProviderInfo(final Document doc) {
final IWindowsAuthProvider auth = new WindowsAuthProviderImpl();
final Element node = doc.createElement("auth");
node.setAttribute("class", auth.getClass().getName());
// Current User
Element child = doc.createElement("currentUser");
node.appendChild(child);
final String currentUsername = WindowsAccountImpl.getCurrentUsername();
addAccountInfo(doc, child, new WindowsAccountImpl(currentUsername));
// Computer
child = doc.createElement("computer");
node.appendChild(child);
IWindowsComputer c = auth.getCurrentComputer();
Element value = doc.createElement("computerName");
value.setTextContent(c.getComputerName());
child.appendChild(value);
value = doc.createElement("memberOf");
value.setTextContent(c.getMemberOf());
child.appendChild(value);
value = doc.createElement("joinStatus");
value.setTextContent(c.getJoinStatus());
child.appendChild(value);
value = doc.createElement("groups");
Element g;
for (String s : c.getGroups()) {
g = doc.createElement("group");
g.setTextContent(s);
value.appendChild(g);
}
child.appendChild(value);
// Only Show Domains if we are in a Domain
if (Netapi32Util.getJoinStatus() == LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName) {
child = doc.createElement("domains");
node.appendChild(child);
Element d;
for (IWindowsDomain domain : auth.getDomains()) {
d = doc.createElement("domain");
node.appendChild(d);
value = doc.createElement("FQN");
value.setTextContent(domain.getFqn());