ModelNode stackNode = stack.getValue(); final LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null); holders.put(name, holder); authenticationInfo.add(holder);
public void addAppConfigurationEntry(AppConfigurationEntry entry) { holder.addAppConfigurationEntry(entry); } });
Attribute nameAttribute = (Attribute) lmshEvent.getAttributes().next(); String nameAttributeValue = StaxParserUtil.getAttributeValue(nameAttribute); LoginModuleStackHolder holder = new LoginModuleStackHolder(nameAttributeValue, null); holders.put(nameAttributeValue, holder); authInfo.add(holder); if ("login-module".equals(peekedStartElementName)) holder.addAppConfigurationEntry(this.getJAASEntry(xmlEventReader));
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()); } } }
public LoginModuleStackHolder getLoginModuleStackHolder(String name) { for (LoginModuleStackHolder holder : this.loginModuleStack) { if (holder.getName().equals(name)) return holder; } return null; }
/** * <p> * Overridden to return the entries that have been configured in the login-config-stack. If more than one * stack has been configured, then the entries corresponding to the first stack will be returned. * </p> */ @Override public AppConfigurationEntry[] getAppConfigurationEntry() { if (this.loginModuleStack.size() > 0) return loginModuleStack.get(0).getAppConfigurationEntry(); else return new AppConfigurationEntry[0]; }
holder = new LoginModuleStackHolder(name, null); holders.put(name, holder); authInfo.add(holder); if (element2.equals(Element.LOGIN_MODULE)) holder.addAppConfigurationEntry(getJAASEntry(reader));
/** * 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()); } } }
public LoginModuleStackHolder getLoginModuleStackHolder(String name) { for (LoginModuleStackHolder holder : this.loginModuleStack) { if (holder.getName().equals(name)) return holder; } return null; }
/** * <p> * Overridden to return the entries that have been configured in the login-config-stack. If more than one * stack has been configured, then the entries corresponding to the first stack will be returned. * </p> */ @Override public AppConfigurationEntry[] getAppConfigurationEntry() { if (this.loginModuleStack.size() > 0) return loginModuleStack.get(0).getAppConfigurationEntry(); else return new AppConfigurationEntry[0]; }
public Object instantiate() { return new LoginModuleStackHolder(lmsName, appEntries); }
public void addAppConfigurationEntry(AppConfigurationEntry entry) { holder.addAppConfigurationEntry(entry); } });
/** * 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()); } } }
/** * A ServerAuthModule may delegate its decision making to a stack * of LoginModules * * @param loginModuleStackHolder a stack of LoginModules */ public void setLoginModuleStackHolder(LoginModuleStackHolder loginModuleStackHolder) { if(loginModuleStackHolder == null) throw new IllegalArgumentException("loginModuleStackHolder is null"); this.loginModuleStackHolder = loginModuleStackHolder; this.loginModuleStackHolderName = this.loginModuleStackHolder.getName(); }
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; }
public void addAppConfigurationEntry(AppConfigurationEntry entry) { holder.addAppConfigurationEntry(entry); } });
writer.writeAttribute(Attribute.NAME.getLocalName(), entry.getName()); for (int j = 0; j < entry.getAppConfigurationEntry().length; j++) AppConfigurationEntry ace = entry.getAppConfigurationEntry()[j]; String code = ace.getLoginModuleName(); if (AuthenticationConfigParser.loginModulesMap.containsValue(code)) {
public LoginModuleStackHolder removeLoginModuleStackHolder(String name) { for (Iterator<LoginModuleStackHolder> it = this.loginModuleStack.iterator(); it.hasNext();) { LoginModuleStackHolder holder = it.next(); if (holder.getName().equals(name)) { it.remove(); return holder; } } return null; }
ModelNode stackNode = stack.getValue(); final LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null); holders.put(name, holder); authenticationInfo.add(holder);
public void addAppConfigurationEntry(AppConfigurationEntry entry) { holder.addAppConfigurationEntry(entry); } });