public class JAASSecurityManager extends Object implements HornetQSecurityManager, org.hornetq.core.server.HornetQComponent
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.| Modifier and Type | Class and Description |
|---|---|
static class |
JAASSecurityManager.SimplePrincipal |
| Constructor and Description |
|---|
JAASSecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
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 |
setCallbackHandler(CallbackHandler handler) |
void |
setConfiguration(Configuration config) |
void |
setConfigurationName(String configurationName) |
void |
setDefaultUser(String username) |
void |
start()
lifecycle method, needs to be called
|
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
|
public boolean validateUser(String user, String password)
HornetQSecurityManagervalidateUser in interface HornetQSecurityManageruser - the userpassword - the users passwordpublic boolean validateUserAndRole(String user, String password, Set<org.hornetq.core.security.Role> roles, org.hornetq.core.security.CheckType checkType)
HornetQSecurityManagervalidateUserAndRole in interface HornetQSecurityManageruser - the userpassword - the users passwordroles - the roles the user hascheckType - the type of check to performpublic void addRole(String user, String role)
HornetQSecurityManageraddRole in interface HornetQSecurityManageruser - the userrole - the role to addpublic void addUser(String user, String password)
HornetQSecurityManageraddUser in interface HornetQSecurityManageruser - the user to addpassword - theusers passwordpublic void removeRole(String user, String role)
HornetQSecurityManagerremoveRole in interface HornetQSecurityManageruser - the userrole - the role to removepublic void removeUser(String user)
HornetQSecurityManagerremoveUser in interface HornetQSecurityManageruser - the user to removepublic void setDefaultUser(String username)
setDefaultUser in interface HornetQSecurityManagerpublic void start()
throws Exception
start in interface org.hornetq.core.server.HornetQComponentExceptionpublic void stop()
stop in interface org.hornetq.core.server.HornetQComponentpublic boolean isStarted()
isStarted in interface org.hornetq.core.server.HornetQComponentpublic void setConfigurationName(String configurationName)
public void setCallbackHandler(CallbackHandler handler)
public void setConfiguration(Configuration config)
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.