Class SimpleAuthenticationBroker

All Implemented Interfaces:
Broker, Region, AuthenticationBroker, org.apache.activemq.Service

public class SimpleAuthenticationBroker extends AbstractAuthenticationBroker
Handles authenticating a users against a simple user name/password map.
  • Constructor Details

  • Method Details

    • setAnonymousAccessAllowed

      public void setAnonymousAccessAllowed(boolean anonymousAccessAllowed)
    • setAnonymousUser

      public void setAnonymousUser(String anonymousUser)
    • setAnonymousGroup

      public void setAnonymousGroup(String anonymousGroup)
    • setUserPasswords

      public void setUserPasswords(Map<String,String> value)
    • setUserGroups

      public void setUserGroups(Map<String,Set<Principal>> value)
    • addConnection

      public void addConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info) throws Exception
      Description copied from interface: Broker
      A client is establishing a connection with the broker.
      Specified by:
      addConnection in interface Broker
      Overrides:
      addConnection in class BrokerFilter
      Throws:
      Exception - TODO
    • authenticate

      public SecurityContext authenticate(String username, String password, X509Certificate[] certificates) throws SecurityException
      Description copied from interface: AuthenticationBroker
      Authenticate the given user using the mechanism provided by this service.
      Parameters:
      username - the given user name to authenticate, null indicates an anonymous user.
      password - the given password for the user to authenticate.
      certificates - for an SSL channel the certificates from remote peer.
      Returns:
      a new SecurityContext for the authenticated user.
      Throws:
      SecurityException - if the user cannot be authenticated.