Restructure JCR repository wrappers
[lgpl/argeo-commons.git] / security / plugins / org.argeo.security.equinox / src / main / java / org / argeo / security / equinox / SpringLoginModule.java
index 553b0994da0ff39c763ceaa5fb29858d7a3e81d3..adeec870eadfd137c746863ab125366f9eb9a0cd 100644 (file)
@@ -111,18 +111,15 @@ public class SpringLoginModule extends SecurityContextLoginModule {
                        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";
+                       final String defaultNodeUrl = System.getProperty(NODE_REPO_URI,
+                                       "http://localhost:7070/org.argeo.jcr.webapp/remoting/node");
                        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 });
+                                               passwordCallback, urlCallback });
                        else
                                callbackHandler.handle(new Callback[] { nameCallback,
                                                passwordCallback });
@@ -139,9 +136,8 @@ public class SpringLoginModule extends SecurityContextLoginModule {
                        NodeAuthenticationToken credentials;
                        if (remote) {
                                String url = urlCallback.getName();
-                               String workspace = securityWorkspaceCallback.getName();
                                credentials = new NodeAuthenticationToken(username, password,
-                                               url, workspace);
+                                               url);
                        } else {
                                credentials = new NodeAuthenticationToken(username, password);
                        }