Package java.security.acl

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


   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


         {
            group = new SimpleGroup(roleGroup);
            roleGroups.put(roleGroup, group);
         }
         SimplePrincipal role = new SimplePrincipal(roleName);
         group.addMember(role);
      }
      public int compareTo(User obj)
      {
         return name.compareTo(obj.name);
      }
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

    @Override
    protected Group[] getRoleSets() throws LoginException {
        Group roles = new SimpleGroup("Roles");
        Group callerPrincipal = new SimpleGroup("CallerPrincipal");
        Group[] groups = { roles, callerPrincipal };
        callerPrincipal.addMember(getIdentity());
        return groups;
    }

    private Properties loadProperties(final String name) throws IOException {
        ClassLoader classLoader = SecurityActions.getContextClassLoader();
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

         boolean authenticated = user.equals(options.get("user")) && password.equals(options.get("pass"));

         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

      {
         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 (additionalRole != null)
               {
                  Principal role = createIdentity(additionalRole);
                  if (!group.isMember(role))
                  {
                     group.addMember(role);
                  }
               }
               if (defaultAssignedRole != null)
               {
                  Principal role = createIdentity(defaultAssignedRole);
View Full Code Here

               if (defaultAssignedRole != null)
               {
                  Principal role = createIdentity(defaultAssignedRole);
                  if (!group.isMember(role))
                  {
                     group.addMember(role);
                  }
               }
            }
         }
      }
View Full Code Here

               if (additionalRole != null)
               {
                  Principal role = createIdentity(additionalRole);
                  if (!group.isMember(role))
                  {
                     group.addMember(role);
                  }
               }
               if (defaultAssignedRole != null)
               {
                  Principal role = createIdentity(defaultAssignedRole);
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.