git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@496571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonas B. Lim 2007-01-16 02:05:48 +00:00
parent ba7519049f
commit f490982c38
4 changed files with 13 additions and 13 deletions

View File

@ -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;

View File

@ -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));

View File

@ -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) {

View File

@ -27,10 +27,10 @@
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="system" password="manager"
group="users,admins"/>
groups="users,admins"/>
<authenticationUser username="user" password="password"
group="users"/>
<authenticationUser username="guest" password="password" group="guests"/>
groups="users"/>
<authenticationUser username="guest" password="password" groups="guests"/>
</users>
</simpleAuthenticationPlugin>