Package java.security.acl

Examples of java.security.acl.Group.addMember()


         {
            /* A NestableGroup only allows Groups to be added to it so we
            need to add a SimpleGroup to subjectRoles to contain the roles
            */
            SimpleGroup tmp = new SimpleGroup("Roles");
            subjectGroup.addMember(tmp);
            subjectGroup = tmp;
         }
         // Copy the group members to the Subject group
         Enumeration members = group.members();
         while( members.hasMoreElements() )
View Full Code Here


         // Copy the group members to the Subject group
         Enumeration members = group.members();
         while( members.hasMoreElements() )
         {
            Principal role = (Principal) members.nextElement();
            subjectGroup.addMember(role);
         }
      }
      return true;
   }
View Full Code Here

   public Group asGroup()
   {
      try
      {
         Group gp = IdentityFactory.createGroup("Roles");
         gp.addMember(IdentityFactory.createPrincipal(role.getRoleName()));
         return gp;
      }
      catch(Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

      if(a != null)
      {
         Enumeration<? extends Principal> en = a.members();
         while(en.hasMoreElements())
         {
            newGroup.addMember(en.nextElement());
         }
      }
      return newGroup;
   }
  
View Full Code Here

         {
            group = new SimpleGroup(roleGroup);
            roleGroups.put(roleGroup, group);
         }
         SimplePrincipal role = new SimplePrincipal(roleName);
         group.addMember(role);
      }
      public int compareTo(Object obj)
      {
         User u = (User) obj;
         return name.compareTo(u.name);
View Full Code Here

      {
         boolean authenticated = (Boolean)options.get("authenticated");
         if (authenticated)
         {
            Group roles = new SimpleGroup("Roles");
            roles.addMember(new JAASSecurityManager.SimplePrincipal((String)options.get("role")));
            subject.getPrincipals().add(roles);
         }
         return authenticated;

      }
View Full Code Here

      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);

      for (String role : roles)
      {
         roleGroup.addMember(new SimplePrincipal(role));
      }
     
      subject.getPrincipals().add(roleGroup);
     
      return true;
View Full Code Here

         {
            /* A NestableGroup only allows Groups to be added to it so we
            need to add a SimpleGroup to subjectRoles to contain the roles
            */
            SimpleGroup tmp = new SimpleGroup("Roles");
            subjectGroup.addMember(tmp);
            subjectGroup = tmp;
         }
         // Copy the group members to the Subject group
         Enumeration<? extends Principal> members = group.members();
         while( members.hasMoreElements() )
View Full Code Here

         // Copy the group members to the Subject group
         Enumeration<? extends Principal> members = group.members();
         while( members.hasMoreElements() )
         {
            Principal role = (Principal) members.nextElement();
            subjectGroup.addMember(role);
         }
      }
      return true;
   }
View Full Code Here

           try
           {
              Principal p = aslm.createIdentity(name);
              if( trace )
                 log.trace("Assign user to role " + name);
              group.addMember(p);
           }
           catch(Exception e)
           {
              log.debug("Failed to create principal: "+name, e);
           }
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.