|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.messaging.core.security.impl.JAASSecurityManager
public class JAASSecurityManager
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 JAASSecurityManager.SimplePrincipal
for each role of the user.
Nested Class Summary | |
---|---|
static class |
JAASSecurityManager.SimplePrincipal
|
Constructor Summary | |
---|---|
JAASSecurityManager()
|
Method Summary | |
---|---|
void |
addRole(java.lang.String user,
java.lang.String role)
adds a new role for a user. |
void |
addUser(java.lang.String user,
java.lang.String password)
adds a new user |
boolean |
isStarted()
|
void |
removeRole(java.lang.String user,
java.lang.String role)
removes a role from a user |
void |
removeUser(java.lang.String user)
removes a user and any roles they may have. |
void |
setCallbackHandler(javax.security.auth.callback.CallbackHandler handler)
|
void |
setConfiguration(javax.security.auth.login.Configuration config)
|
void |
setConfigurationName(java.lang.String configurationName)
|
void |
setDefaultUser(java.lang.String username)
|
void |
start()
lifecycle method, needs to be called |
void |
stop()
|
boolean |
validateUser(java.lang.String user,
java.lang.String password)
is this a valid user. |
boolean |
validateUserAndRole(java.lang.String user,
java.lang.String password,
java.util.Set<Role> roles,
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 |
---|
public JAASSecurityManager()
Method Detail |
---|
public boolean validateUser(java.lang.String user, java.lang.String password)
JBMSecurityManager
validateUser
in interface JBMSecurityManager
user
- the userpassword
- the users password
public boolean validateUserAndRole(java.lang.String user, java.lang.String password, java.util.Set<Role> roles, CheckType checkType)
JBMSecurityManager
validateUserAndRole
in interface JBMSecurityManager
user
- the userpassword
- the users passwordroles
- the roles the user hascheckType
- the type of check to perform
public void addRole(java.lang.String user, java.lang.String role)
JBMSecurityManager
addRole
in interface JBMSecurityManager
user
- the userrole
- the role to addpublic void addUser(java.lang.String user, java.lang.String password)
JBMSecurityManager
addUser
in interface JBMSecurityManager
user
- the user to addpassword
- theusers passwordpublic void removeRole(java.lang.String user, java.lang.String role)
JBMSecurityManager
removeRole
in interface JBMSecurityManager
user
- the userrole
- the role to removepublic void removeUser(java.lang.String user)
JBMSecurityManager
removeUser
in interface JBMSecurityManager
user
- the user to removepublic void setDefaultUser(java.lang.String username)
setDefaultUser
in interface JBMSecurityManager
public void start() throws java.lang.Exception
start
in interface MessagingComponent
java.lang.Exception
public void stop()
stop
in interface MessagingComponent
public boolean isStarted()
isStarted
in interface MessagingComponent
public void setConfigurationName(java.lang.String configurationName)
public void setCallbackHandler(javax.security.auth.callback.CallbackHandler handler)
public void setConfiguration(javax.security.auth.login.Configuration config)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |