- String url = remote ? urlCallback.getName() : null;
- if (remote && (url == null || url.trim().equals("")))
- // for convenience, may be removed in the future
- url = System.getProperty(NODE_REPO_URI);
-
- // TODO: set it via system properties
- String workspace = null;
-
- SiteAuthenticationToken credentials = new SiteAuthenticationToken(
- username, password, url, workspace);
+ NodeAuthenticationToken credentials;
+ if (remote) {
+ String url = urlCallback.getName();
+ String workspace = securityWorkspaceCallback.getName();
+ credentials = new NodeAuthenticationToken(username, password,
+ url, workspace);
+ } else {
+ credentials = new NodeAuthenticationToken(username, password);
+ }