org.jboss.security.auth.spi
Class DeploymentRolesLoginModule
java.lang.Object
org.jboss.security.auth.spi.AbstractServerLoginModule (src)
org.jboss.security.auth.spi.DeploymentRolesLoginModule
- All Implemented Interfaces:
- javax.security.auth.spi.LoginModule
- public class DeploymentRolesLoginModule
- extends AbstractServerLoginModule (src)
The DeploymentRolesLoginModule adds the roles to the subject that were declared in the
assembly-descriptor element in jboss.xml.
It gets the roles from the SecurityRolesAssociation, which holds a Map of SecurityRoleMetaData.
Method Summary |
protected java.security.Principal |
getIdentity()
Overriden by subclasses to return the Principal that corresponds to
the user primary identity. |
protected java.security.acl.Group[] |
getRoleSets()
Create the 'Roles' group and populate it with the
principals security roles from the SecurityRolesAssociation |
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
Initialize the login module. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeploymentRolesLoginModule
public DeploymentRolesLoginModule()
initialize
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
- Initialize the login module.
- Specified by:
initialize
in interface javax.security.auth.spi.LoginModule
- Overrides:
initialize
in class AbstractServerLoginModule (src)
- Parameters:
subject
- the Subject to update after a successful login.callbackHandler
- the CallbackHandler that will be used to obtain the
the user identity and credentials.sharedState
- a Map shared between all configured login module instancesoptions
- the parameters passed to the login module.
getIdentity
protected java.security.Principal getIdentity()
- Overriden by subclasses to return the Principal that corresponds to
the user primary identity.
- Specified by:
getIdentity
in class AbstractServerLoginModule (src)
getRoleSets
protected java.security.acl.Group[] getRoleSets()
throws javax.security.auth.login.LoginException
- Create the 'Roles' group and populate it with the
principals security roles from the SecurityRolesAssociation
- Specified by:
getRoleSets
in class AbstractServerLoginModule (src)
- Returns:
- Group[] containing the sets of roles
- Throws:
javax.security.auth.login.LoginException