Examples of JASPIAuthenticationInfo


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

         sam.initialize(null, null, new SecurityAssociationHandler(), options);
         modules.add(sam);
      }
      else
      {
         JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo)bai;
         AuthModuleEntry[] amearr = jai.getAuthModuleEntry();
         for(AuthModuleEntry ame: amearr)
         {
            if(ame.getLoginModuleStackHolderName() != null)
            {
               try
View Full Code Here

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

         SecurityActions.addModules(binfo, authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if(isJASPIAuthentication)
      {
         binfo = new JASPIAuthenticationInfo(authName);
         SecurityActions.addModules(binfo, authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if(isAuthorization)
      {
View Full Code Here

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

    * @see org.jboss.security.microcontainer.beans.BasePolicyBean#getPolicyInfo(java.lang.String)
    */
   @Override
   public BaseAuthenticationInfo getPolicyInfo(String domainName)
   {
      JASPIAuthenticationInfo info = new JASPIAuthenticationInfo(domainName);
      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.
      for (StackRefPolicyModule module : super.modules)
      {
         AuthModuleEntry entry = new AuthModuleEntry(module.getCode(), module.getOptions(), module.getStackRef());
         entry.setLoginModuleStackHolder(stackMap.get(module.getStackRef()));
         info.add(entry);
      }

      return info;
   }
View Full Code Here

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

         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
View Full Code Here

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

         SecurityActions.addModules(binfo, authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if (isJASPIAuthentication)
      {
         JASPIAuthenticationInfo jaspiInfo = new JASPIAuthenticationInfo(authName);
         SecurityActions.addModules(jaspiInfo, authenticationModuleEntries);
         for (LoginModuleStackHolder holder : this.loginModuleStackMap.values())
            jaspiInfo.add(holder);
         info.setAuthenticationInfo(jaspiInfo);
      }
      if (isAuthorization)
      {
         ainfo = new AuthorizationInfo(authName);
View Full Code Here

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

    private boolean processJASPIAuth(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) {
        node = peek(node, AUTHENTICATION, JASPI);
        if (node == null)
            return false;

        JASPIAuthenticationInfo authenticationInfo = new JASPIAuthenticationInfo(securityDomain);
        Map<String, LoginModuleStackHolder> holders = new HashMap<String, 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_MODULES)) {
                processLoginModules(stackNode.get(LOGIN_MODULES), authenticationInfo, new LoginModuleContainer() {
                    public void addAppConfigurationEntry(AppConfigurationEntry entry) {
                        holder.addAppConfigurationEntry(entry);
                    }
                });
            }
        }
        List<ModelNode> authModules = node.get(AUTH_MODULES).asList();
        for (ModelNode authModule : authModules) {
            String code = extractCode(authModule, ModulesMap.AUTHENTICATION_MAP);
            String loginStackRef = null;
            if (authModule.hasDefined(LOGIN_MODULE_STACK_REF))
                loginStackRef = authModule.get(LOGIN_MODULE_STACK_REF).asString();
            Map<String, Object> options = extractOptions(authModule) ;
            AuthModuleEntry entry = new AuthModuleEntry(code, options, loginStackRef);
            if (loginStackRef != null) {
                if (!holders.containsKey(loginStackRef)) {
                    throw SecurityMessages.MESSAGES.loginModuleStackIllegalArgument(loginStackRef);
                }
                entry.setLoginModuleStackHolder(holders.get(loginStackRef));
            }
            authenticationInfo.add(entry);
        }
        applicationPolicy.setAuthenticationInfo(authenticationInfo);
        return true;
    }
View Full Code Here

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

         binfo.add(authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if(isJASPIAuthentication)
      {
         binfo = new JASPIAuthenticationInfo(authName);
         binfo.add(authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if(isAuthorization)
      {
View Full Code Here

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

         SecurityActions.addModules(binfo, authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if(isJASPIAuthentication)
      {
         binfo = new JASPIAuthenticationInfo(authName);
         SecurityActions.addModules(binfo, authenticationModuleEntries);
         info.setAuthenticationInfo(binfo);
      }
      if(isAuthorization)
      {
View Full Code Here

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

    private boolean processJASPIAuth(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) {
        node = peek(node, AUTHENTICATION, JASPI);
        if (node == null)
            return false;

        JASPIAuthenticationInfo authenticationInfo = new JASPIAuthenticationInfo(securityDomain);
        Map<String, LoginModuleStackHolder> holders = new HashMap<String, 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_MODULES)) {
                processLoginModules(stackNode.get(LOGIN_MODULES), authenticationInfo, new LoginModuleContainer() {
                    public void addAppConfigurationEntry(AppConfigurationEntry entry) {
                        holder.addAppConfigurationEntry(entry);
                    }
                });
            }
        }
        List<ModelNode> authModules = node.get(AUTH_MODULES).asList();
        for (ModelNode authModule : authModules) {
            String code = extractCode(authModule, ModulesMap.AUTHENTICATION_MAP);
            String loginStackRef = null;
            if (authModule.hasDefined(LOGIN_MODULE_STACK_REF))
                loginStackRef = authModule.get(LOGIN_MODULE_STACK_REF).asString();
            Map<String, Object> options = extractOptions(authModule) ;
            AuthModuleEntry entry = new AuthModuleEntry(code, options, loginStackRef);
            if (authModule.hasDefined(FLAG)) {
                entry.setControlFlag(ControlFlag.valueOf(authModule.get(FLAG).asString()));
            }
            if (loginStackRef != null) {
                if (!holders.containsKey(loginStackRef)) {
                    throw SecurityMessages.MESSAGES.loginModuleStackIllegalArgument(loginStackRef);
                }
                entry.setLoginModuleStackHolder(holders.get(loginStackRef));
            }
            authenticationInfo.add(entry);

            String moduleName = authModule.get(MODULE).asString();
            if(authModule.hasDefined(MODULE) && moduleName != null &&  moduleName.length() > 0 ) {
                authenticationInfo.setJBossModuleName(moduleName);
            }
        }
        applicationPolicy.setAuthenticationInfo(authenticationInfo);
        return true;
    }
View Full Code Here

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

         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
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.