/** * <p> * Overriden to include the stacks of login modules in the merged object. * </p> */ @Override public BaseSecurityInfo<Object> merge(BaseSecurityInfo<Object> bi) { if (bi instanceof JASPIAuthenticationInfo == false) throw new IllegalArgumentException("Base policy does not contain a JASPI authentication configuration"); // merge the auth modules JASPIAuthenticationInfo merged = (JASPIAuthenticationInfo) super.merge(bi); // merge the stacks of login modules JASPIAuthenticationInfo parent = (JASPIAuthenticationInfo) bi; for (LoginModuleStackHolder holder : parent.getLoginModuleStackHolder()) merged.add(holder); for (LoginModuleStackHolder holder : this.getLoginModuleStackHolder()) merged.add(holder); return merged; }
/** * <p> * Overriden to include the stacks of login modules in the merged object. * </p> */ @Override public BaseSecurityInfo<Object> merge(BaseSecurityInfo<Object> bi) { if (bi instanceof JASPIAuthenticationInfo == false) throw PicketBoxMessages.MESSAGES.invalidType(JASPIAuthenticationInfo.class.getName()); // merge the auth modules JASPIAuthenticationInfo merged = (JASPIAuthenticationInfo) super.merge(bi); // merge the stacks of login modules JASPIAuthenticationInfo parent = (JASPIAuthenticationInfo) bi; for (LoginModuleStackHolder holder : parent.getLoginModuleStackHolder()) merged.add(holder); for (LoginModuleStackHolder holder : this.getLoginModuleStackHolder()) merged.add(holder); return merged; }
public Object newChild(JASPIAuthenticationInfo info, UnmarshallingContext navigator, String namespaceUri, String localName, Attributes attrs) { Object child = null; if (trace) log.trace("newChild.AuthenticationJaspiInfo, localName: " + localName); if ("login-module-stack".equals(localName)) { String lmsName = attrs.getValue("name"); lmsName = StringPropertyReplacer.replaceProperties(lmsName.trim()); child = new LoginModuleStackHolder(lmsName, null); if (trace) log.trace("newChild.AuthenticationInfo, login-module-stack: " + lmsName); } else if ("auth-module".equals(localName)) { String code = attrs.getValue("code"); AuthModuleEntry authModuleEntry = new AuthModuleEntry(code, null, null); String flag = attrs.getValue("flag"); authModuleEntry.setControlFlag(getControlFlag(flag)); String lmsRef = attrs.getValue("login-module-stack-ref"); if (lmsRef != null) authModuleEntry.setLoginModuleStackHolder(info.getLoginModuleStackHolder(lmsRef)); child = authModuleEntry; } return child; }
private void handleJASPIDelegation(ApplicationPolicy aPolicy) { BaseAuthenticationInfo bai = aPolicy.getAuthenticationInfo(); if (bai instanceof JASPIAuthenticationInfo) { JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai; LoginModuleStackHolder[] lmsharr = jai.getLoginModuleStackHolder(); for (LoginModuleStackHolder lmsh : lmsharr) { xmlConfig.addAppConfig(lmsh.getName(), lmsh.getAppConfigurationEntry()); } } }
/** * Handle the case when JASPI Info may have login module stack holder which delegates to a login module stack * * @param aPolicy */ private void handleJASPIDelegation(ApplicationPolicy aPolicy) { BaseAuthenticationInfo bai = aPolicy.getAuthenticationInfo(); if (bai instanceof JASPIAuthenticationInfo) { JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai; LoginModuleStackHolder[] lmsharr = jai.getLoginModuleStackHolder(); for (LoginModuleStackHolder lmsh : lmsharr) { this.addAppConfig(lmsh.getName(), lmsh.getAppConfigurationEntry()); } } }
/** * Handle the case when JASPI Info may have login module stack holder which delegates to a login module stack * * @param aPolicy */ private void handleJASPIDelegation(ApplicationPolicy aPolicy) { BaseAuthenticationInfo bai = aPolicy.getAuthenticationInfo(); if (bai instanceof JASPIAuthenticationInfo) { JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai; LoginModuleStackHolder[] lmsharr = jai.getLoginModuleStackHolder(); for (LoginModuleStackHolder lmsh : lmsharr) { this.addAppConfig(lmsh.getName(), lmsh.getAppConfigurationEntry()); } } }