org.hornetq.spi.core.security
Class HornetQSecurityManagerImpl

java.lang.Object
  extended by org.hornetq.spi.core.security.HornetQSecurityManagerImpl
All Implemented Interfaces:
org.hornetq.core.server.HornetQComponent, HornetQSecurityManager

public class HornetQSecurityManagerImpl
extends Object
implements HornetQSecurityManager

A basic implementation of the HornetQSecurityManager. This can be used within an appserver and be deployed by BasicUserCredentialsDeployer or used standalone or embedded.

Author:
Andy Taylor

Constructor Summary
HornetQSecurityManagerImpl()
           
 
Method Summary
 void addRole(String user, String role)
          adds a new role for a user.
 void addUser(String user, String password)
          adds a new user
 boolean isStarted()
           
 void removeRole(String user, String role)
          removes a role from a user
 void removeUser(String user)
          removes a user and any roles they may have.
 void setDefaultUser(String username)
           
 void start()
           
 void stop()
           
 boolean validateUser(String user, String password)
          is this a valid user.
 boolean validateUserAndRole(String user, String password, Set<org.hornetq.core.security.Role> roles, org.hornetq.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

HornetQSecurityManagerImpl

public HornetQSecurityManagerImpl()
Method Detail

start

public void start()
Specified by:
start in interface org.hornetq.core.server.HornetQComponent

stop

public void stop()
Specified by:
stop in interface org.hornetq.core.server.HornetQComponent

isStarted

public boolean isStarted()
Specified by:
isStarted in interface org.hornetq.core.server.HornetQComponent

validateUser

public boolean validateUser(String user,
                            String password)
Description copied from interface: HornetQSecurityManager
is this a valid user.

Specified by:
validateUser in interface HornetQSecurityManager
Parameters:
user - the user
password - the users password
Returns:
true if a valid user

validateUserAndRole

public boolean validateUserAndRole(String user,
                                   String password,
                                   Set<org.hornetq.core.security.Role> roles,
                                   org.hornetq.core.security.CheckType checkType)
Description copied from interface: HornetQSecurityManager
is this a valid user and do they have the correct role

Specified by:
validateUserAndRole in interface HornetQSecurityManager
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

addUser

public void addUser(String user,
                    String password)
Description copied from interface: HornetQSecurityManager
adds a new user

Specified by:
addUser in interface HornetQSecurityManager
Parameters:
user - the user to add
password - theusers password

removeUser

public void removeUser(String user)
Description copied from interface: HornetQSecurityManager
removes a user and any roles they may have.

Specified by:
removeUser in interface HornetQSecurityManager
Parameters:
user - the user to remove

addRole

public void addRole(String user,
                    String role)
Description copied from interface: HornetQSecurityManager
adds a new role for a user.

Specified by:
addRole in interface HornetQSecurityManager
Parameters:
user - the user
role - the role to add

removeRole

public void removeRole(String user,
                       String role)
Description copied from interface: HornetQSecurityManager
removes a role from a user

Specified by:
removeRole in interface HornetQSecurityManager
Parameters:
user - the user
role - the role to remove

setDefaultUser

public void setDefaultUser(String username)
Specified by:
setDefaultUser in interface HornetQSecurityManager


Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.