Examples of LoginModuleStackHolder


Examples of org.jboss.security.auth.login.LoginModuleStackHolder

            for (ModelNode loginModuleStack : modules) {
                List<ModelNode> nodes = loginModuleStack.asList();
                Iterator<ModelNode> iter = nodes.iterator();
                ModelNode nameNode = iter.next();
                String name = nameNode.get(NAME).asString();
                LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null);
                holders.put(name, holder);
                authenticationInfo.add(holder);
                while (iter.hasNext()) {
                    ModelNode lmsNode = iter.next();
                    List<ModelNode> lms = lmsNode.asList();
                    for (ModelNode lmNode : lms) {
                        String code = lmNode.require(CODE).asString();
                        LoginModuleControlFlag controlFlag = getControlFlag(lmNode.require(FLAG).asString());
                        Map<String, Object> options = new HashMap<String, Object>();
                        if (lmNode.hasDefined(MODULE_OPTIONS)) {
                            for (Property prop : lmNode.get(MODULE_OPTIONS).asPropertyList()) {
                                options.put(prop.getName(), prop.getValue().asString());
                            }
                        }
                        AppConfigurationEntry entry = new AppConfigurationEntry(code, controlFlag, options);
                        holder.addAppConfigurationEntry(entry);
                    }
                }
            }
            ModelNode authModuleNode = node.get(AUTH_MODULE);
            List<ModelNode> authModules = authModuleNode.asList();
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

            ModelNode moduleStack = node.get(Element.LOGIN_MODULE_STACK.getLocalName());
            modules = moduleStack.asList();
            Iterator<ModelNode> iter = modules.iterator();
            ModelNode nameNode = iter.next();
            String name = nameNode.get(Attribute.NAME.getLocalName()).asString();
            LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null);
            holders.put(name, holder);
            authenticationInfo.add(holder);
            while (iter.hasNext()) {
                ModelNode module = iter.next();
                String code = module.require(Attribute.CODE.getLocalName()).asString();
                LoginModuleControlFlag controlFlag = getControlFlag(module.require(Attribute.FLAG.getLocalName()).asString());
                Map<String, Object> options = new HashMap<String, Object>();
                if (module.hasDefined(MODULE_OPTIONS)) {
                    for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
                        options.put(prop.getName(), prop.getValue().asString());
                    }
                }
                AppConfigurationEntry entry = new AppConfigurationEntry(code, controlFlag, options);
                holder.addAppConfigurationEntry(entry);
            }
            ModelNode authModule = node.get(Element.AUTH_MODULE.getLocalName());
            String code = authModule.require(Attribute.CODE.getLocalName()).asString();
            String loginStackRef = null;
            if (authModule.hasDefined(Attribute.LOGIN_MODULE_STACK_REF.getLocalName()))
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

         authenticationModuleEntries.add(ame);
         isJASPIAuthentication = true;
      }
      else if( value instanceof LoginModuleStackHolder )
      {
         LoginModuleStackHolder lmsh = (LoginModuleStackHolder)value;
         loginModuleStackMap.put( lmsh.getName(), lmsh );
         isJASPIAuthentication = true;
      }
      else if( value instanceof AuthorizationModuleEntry )
      {
         AuthorizationModuleEntry ame = (AuthorizationModuleEntry)value;
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

   }
  
   protected void validateAuthModule2(AuthModuleEntry aEntry2)
   {
      assertEquals("auth.module2.class.name", aEntry2.getAuthModuleName());
      LoginModuleStackHolder lmsh = aEntry2.getLoginModuleStackHolder();
      assertNotNull("LoginModuleStackHolder  != null", lmsh);
      assertEquals("lm-stack", lmsh.getName());
   }
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

   }
  
   private void validateAuthModule2(AuthModuleEntry aEntry2)
   {
      assertEquals("auth.module2.class.name", aEntry2.getAuthModuleName());
      LoginModuleStackHolder lmsh = aEntry2.getLoginModuleStackHolder();
      assertNotNull("LoginModuleStackHolder  != null", lmsh);
      assertEquals("lm-stack", lmsh.getName());
   }
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

            List<Property> stacks = node.get(LOGIN_MODULE_STACK).asPropertyList();
            for (Property stack : stacks) {
                String name = stack.getName();
                ModelNode stackNode = stack.getValue();

                final LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null);
                holders.put(name, holder);
                authenticationInfo.add(holder);
                if (stackNode.hasDefined(LOGIN_MODULE)) {
                    processLoginModules(context, stackNode.get(LOGIN_MODULE), authenticationInfo, new LoginModuleContainer() {
                        public void addAppConfigurationEntry(AppConfigurationEntry entry) {
                            holder.addAppConfigurationEntry(entry);
                        }
                    });
                }
            }
        }
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

        List<Property> stacks = node.get(LOGIN_MODULE_STACK).asPropertyList();
        for (Property stack : stacks) {
            String name = stack.getName();
            ModelNode stackNode = stack.getValue();

            final LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null);
            holders.put(name, holder);
            authenticationInfo.add(holder);
            if (stackNode.hasDefined(LOGIN_MODULE)) {
                processLoginModules(context, stackNode.get(LOGIN_MODULE), authenticationInfo, new LoginModuleContainer() {
                    public void addAppConfigurationEntry(AppConfigurationEntry entry) {
                        holder.addAppConfigurationEntry(entry);
                    }
                });
            }
        }
        for (Property moduleProperty : node.get(AUTH_MODULE).asPropertyList()) {
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

         authenticationModuleEntries.add(ame);
         isJASPIAuthentication = true;
      }
      else if( value instanceof LoginModuleStackHolder )
      {
         LoginModuleStackHolder lmsh = (LoginModuleStackHolder)value;
         loginModuleStackMap.put( lmsh.getName(), lmsh );
         isJASPIAuthentication = true;
      }
      else if( value instanceof AuthorizationModuleEntry )
      {
         AuthorizationModuleEntry ame = (AuthorizationModuleEntry)value;
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

      Map<String, LoginModuleStackHolder> stackMap = new HashMap<String, LoginModuleStackHolder>();

      // add the stack modules to the authentication info.
      for (LoginModuleStackBean stackBean : this.moduleStacks)
      {
         LoginModuleStackHolder holder = stackBean.getLoginModuleStackHolder();
         info.add(holder);
         stackMap.put(stackBean.getName(), holder);
      }

      // add the auth modules to the authentication info.
View Full Code Here

Examples of org.jboss.security.auth.login.LoginModuleStackHolder

    *
    * @return the constructed {@code LoginModuleStackHolder}.
    */
   public LoginModuleStackHolder getLoginModuleStackHolder()
   {
      LoginModuleStackHolder holder = new LoginModuleStackHolder(this.name, new ArrayList<AppConfigurationEntry>());

      for (FlaggedPolicyModule module : this.loginModules)
         holder.addAppConfigurationEntry(module.getAppConfigurationEntry());

      return holder;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.