From f490982c3874059a3c65d25026e98234be1916ca Mon Sep 17 00:00:00 2001 From: "Jonas B. Lim" Date: Tue, 16 Jan 2007 02:05:48 +0000 Subject: [PATCH] updated patch for https://issues.apache.org/activemq/browse/AMQ-1010 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@496571 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/security/AuthenticationUser.java | 14 +++++++------- .../security/SimpleAuthenticationPlugin.java | 2 +- .../security/SimpleAuthenticationPluginTest.java | 4 ++-- .../activemq/security/simple-auth-broker.xml | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) 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"/> +