diff --git a/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java b/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java index aebc923443..bbffb045b4 100644 --- a/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java +++ b/activemq-core/src/main/java/org/apache/activemq/security/AuthenticationUser.java @@ -29,22 +29,22 @@ public class AuthenticationUser { String username; String password; - String group; + String groups; - public AuthenticationUser(String username, String password, String group) { + public AuthenticationUser(String username, String password, String groups) { this.username = username; this.password = password; - this.group = group; + this.groups = groups; } - public String getGroup() { - return group; + public String getGroups() { + return groups; } - public void setGroup(String group) { - this.group = group; + public void setGroups(String groups) { + this.groups = groups; } public String getPassword() { return password; diff --git a/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java b/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java index 5001ea746b..34c813f3e8 100644 --- a/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java +++ b/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationPlugin.java @@ -70,7 +70,7 @@ public class SimpleAuthenticationPlugin implements BrokerPlugin { AuthenticationUser user = (AuthenticationUser)it.next(); userPasswords.put(user.getUsername(), user.getPassword()); Set groups = new HashSet(); - StringTokenizer iter = new StringTokenizer(user.getGroup(), ","); + StringTokenizer iter = new StringTokenizer(user.getGroups(), ","); while (iter.hasMoreTokens()) { String name = iter.nextToken().trim(); groups.add(new GroupPrincipal(name)); diff --git a/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java b/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java index d883f0e17e..baab4962ec 100644 --- a/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginTest.java @@ -28,10 +28,10 @@ import org.apache.commons.logging.LogFactory; public class SimpleAuthenticationPluginTest extends SecurityTestSupport { - private static final Log log = LogFactory.getLog(XBeanSecurityTest.class); + private static final Log log = LogFactory.getLog(SimpleAuthenticationPluginTest.class); public static Test suite() { - return suite(XBeanSecurityTest.class); + return suite(SimpleAuthenticationPluginTest.class); } public static void main(String[] args) { diff --git a/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml b/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml index 10c33338ac..057ec296f9 100644 --- a/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml +++ b/activemq-core/src/test/resources/org/apache/activemq/security/simple-auth-broker.xml @@ -27,10 +27,10 @@ + groups="users,admins"/> - + groups="users"/> +