org.jboss.security.auth.spi
Class DeploymentRolesLoginModule

java.lang.Object
  extended by org.jboss.security.auth.spi.AbstractServerLoginModule
      extended by org.jboss.security.auth.spi.DeploymentRolesLoginModule
All Implemented Interfaces:
LoginModule

public class DeploymentRolesLoginModule
extends AbstractServerLoginModule

The DeploymentRolesLoginModule adds the roles to the subject that were declared in the assembly-descriptor element in jboss.xml. This allows dynamic role assignment to a given principal per EJB jar deployment. Used by EJB jar deployments in the CTS.

Version:
$Revision: 1.1.6.5 $
Author:
Thomas.Diesler@jboss.org

Field Summary
 
Fields inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule
callbackHandler, log, loginOk, options, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass
 
Constructor Summary
DeploymentRolesLoginModule()
           
 
Method Summary
protected  Principal getIdentity()
          Overriden by subclasses to return the Principal that corresponds to the user primary identity.
protected  Group[] getRoleSets()
          Create the 'Roles' group and populate it with the principals security roles from the SecurityRolesAssociation
 void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
          Initialize the login module.
 
Methods inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule
abort, commit, createGroup, createIdentity, getUnauthenticatedIdentity, getUseFirstPass, login, logout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentRolesLoginModule

public DeploymentRolesLoginModule()
Method Detail

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map sharedState,
                       Map options)
Initialize the login module.

Specified by:
initialize in interface LoginModule
Overrides:
initialize in class AbstractServerLoginModule
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 instances
options - the parameters passed to the login module.

getIdentity

protected Principal getIdentity()
Overriden by subclasses to return the Principal that corresponds to the user primary identity.

Specified by:
getIdentity in class AbstractServerLoginModule

getRoleSets

protected Group[] getRoleSets()
                       throws LoginException
Create the 'Roles' group and populate it with the principals security roles from the SecurityRolesAssociation

Specified by:
getRoleSets in class AbstractServerLoginModule
Returns:
Group[] containing the sets of roles
Throws:
LoginException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.