+ " or "+ defaultAppDomain);
if(bai instanceof AuthenticationInfo)
{
//Need to get a wrapper
ServerAuthModule sam = new DelegatingServerAuthModule();
Map options = new HashMap();
options.put("javax.security.auth.login.LoginContext", secDomain); //Name of sec domain
sam.initialize(null, null, this.callbackHandler, options);
modules.add(sam);
}
else
{
JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo)bai;
AuthModuleEntry[] amearr = jai.getAuthModuleEntry();
for(AuthModuleEntry ame: amearr)
{
if(ame.getLoginModuleStackHolderName() != null)
{
try
{
mapOptionsByName.put(ame.getAuthModuleName(), ame.getOptions());
controlFlags.add(ame.getControlFlag());
ServerAuthModule sam = this.createSAM(ame.getAuthModuleName(),
ame.getLoginModuleStackHolderName());
Map options = new HashMap();
sam.initialize(null, null, callbackHandler, options);
modules.add(sam);
}
catch (Exception e)
{
throw new AuthException(e.getLocalizedMessage());
}
}
else
{
try
{
mapOptionsByName.put(ame.getAuthModuleName(), ame.getOptions());
controlFlags.add(ame.getControlFlag());
ServerAuthModule sam = this.createSAM(ame.getAuthModuleName());
Map options = new HashMap();
sam.initialize(null, null, callbackHandler, options);
modules.add(sam);
}
catch (Exception e)
{
throw new AuthException(e.getLocalizedMessage());