org.apache.activemq.artemis.spi.core.security

## Class JAASSecurityManager

- java.lang.Object
- - org.apache.activemq.artemis.spi.core.security.JAASSecurityManager

- All Implemented Interfaces:
    ActiveMQSecurityManager

      public class JAASSecurityManager
      extends Object
      implements ActiveMQSecurityManager

  This implementation delegates to the JAAS security interfaces. The `Subject` returned by the login context is expecting to have a `Group` with the `Roles` name containing a set of `Principal` for each role of the user.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JAASSecurityManager.SimplePrincipal`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JAASSecurityManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setCallbackHandler(CallbackHandler handler)`
    `void` | `setConfiguration(Configuration config)`
    `void` | `setConfigurationName(String configurationName)`
    `boolean` | `validateUser(String user, String password)` is this a valid user.
    `boolean` | `validateUserAndRole(String user, String password, Set<org.apache.activemq.artemis.core.security.Role> roles, org.apache.activemq.artemis.core.security.CheckType checkType)` is this a valid user and do they have the correct role

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JAASSecurityManager

          public JAASSecurityManager()

  - ### Method Detail

    - #### validateUser

          public boolean validateUser(String user,
                                      String password)

      Description copied from interface: `ActiveMQSecurityManager`
      is this a valid user.
      Specified by:
        `validateUser` in interface `ActiveMQSecurityManager`
      Parameters:
        `user` - the user
        `password` - the users password
      Returns:
        true if a valid user

    - #### validateUserAndRole

          public boolean validateUserAndRole(String user,
                                             String password,
                                             Set<org.apache.activemq.artemis.core.security.Role> roles,
                                             org.apache.activemq.artemis.core.security.CheckType checkType)

      Description copied from interface: `ActiveMQSecurityManager`
      is this a valid user and do they have the correct role
      Specified by:
        `validateUserAndRole` in interface `ActiveMQSecurityManager`
      Parameters:
        `user` - the user
        `password` - the users password
        `roles` - the roles the user has
        `checkType` - the type of check to perform
      Returns:
        true if the user is valid and they have the correct roles

    - #### setConfigurationName

          public void setConfigurationName(String configurationName)

    - #### setCallbackHandler

          public void setCallbackHandler(CallbackHandler handler)

    - #### setConfiguration

          public void setConfiguration(Configuration config)

Copyright © 2015. All rights reserved.