+ // ask for username and password
+ NameCallback nameCallback = new NameCallback("User");
+ PasswordCallback passwordCallback = new PasswordCallback(
+ "Password", false);
+ final String defaultNodeUrl = "http://localhost:7070/org.argeo.jcr.webapp/remoting/node";
+ final String defaultSecurityWorkspace = "security";
+ NameCallback urlCallback = new NameCallback("Site URL",
+ defaultNodeUrl);
+ NameCallback securityWorkspaceCallback = new NameCallback(
+ "Security Workspace", defaultSecurityWorkspace);
+
+ // handle callbacks
+ if (remote)
+ callbackHandler.handle(new Callback[] { nameCallback,
+ passwordCallback, urlCallback,
+ securityWorkspaceCallback });
+ else
+ callbackHandler.handle(new Callback[] { nameCallback,
+ passwordCallback });
+
+ // create credentials