activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac" <de...@nighttale.net>
Subject Re: Adding authentication plugin by program
Date Tue, 20 Jan 2009 14:21:13 GMT
Sure,

you can do something like this

SimpleAuthenticationPlugin authentication =  new
SimpleAuthenticationPlugin();

  List <AuthenticationUser> users =  new ArrayList <AuthenticationUser> =
  users.add(new AuthenticationUser("admin",
                                   "password",
                                   "admins,publishers,consumers"));
  users.add(new AuthenticationUser("publisher",
                                   "password",
                                   "publishers,consumers"));
  users.add(new AuthenticationUser("consumer",
                                   "password",
                                   "consumers"));
  users.add(new AuthenticationUser("guest",
                                   "password",
                                   "guests"));
  authentication.setUsers(users);

broker.setPlugins(new BrokerPlugin[]{authentication});

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Jan 20, 2009 at 3:15 PM, Henri Gomez <henri.gomez@gmail.com> wrote:

> Hi to all,
>
> I read the security plugin information in
> http://activemq.apache.org/security.html.
>
> I wonder if we could add an authentication/authorisation plugin
> programaticaly, ie on BrokerService.
>
> Regards.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message