Package org.jboss.security

Examples of org.jboss.security.SimpleGroup.addMember()


   {
      SimpleGroup roles = new SimpleGroup("Roles");
      Group[] roleSets = {roles};
      for (String role : roleSet)
      {
         roles.addMember(new SimplePrincipal(role));
      }
      return roleSets;
   }

}
View Full Code Here


   {
      SimpleGroup roles = new SimpleGroup("Roles");
      Group[] roleSets = {roles};
      for (Role role : access.getUser().getRoles())
      {
         roles.addMember(new SimplePrincipal(role.getName()));
      }
      return roleSets;
   }
}
View Full Code Here

   {
      SimpleGroup roles = new SimpleGroup("Roles");
      Group[] roleSets = {roles};
      for (Role role : access.getUser().getRoles())
      {
         roles.addMember(new SimplePrincipal(role.getName()));
      }
      return roleSets;
   }
}
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

   private Group getGroupFromRoleSet(Set<Principal> roleset)
   {
      Group gp = new SimpleGroup(SecurityConstants.ROLES_IDENTIFIER);
      for(Principal p: roleset)
      {
         gp.addMember(p);
      }
      return gp;
   }
}
View Full Code Here

/*     */     {
/*  94 */       StringTokenizer tokenizer = new StringTokenizer(this.roleNames, ",");
/*  95 */       while (tokenizer.hasMoreTokens())
/*     */       {
/*  97 */         String roleName = tokenizer.nextToken();
/*  98 */         roles.addMember(new SimplePrincipal(roleName));
/*     */       }
/*     */     }
/* 101 */     return roleSets;
/*     */   }
/*     */ }
View Full Code Here

/*  85 */       Group newRoles = new SimpleGroup("Roles");
/*  86 */       Iterator iter = roleset.iterator();
/*  87 */       while (iter.hasNext())
/*     */       {
/*  89 */         String rolename = (String)iter.next();
/*  90 */         newRoles.addMember(createNewPrincipal(mappedObject, rolename));
/*     */       }
/*  92 */       mappedObject = MappingProviderUtil.replacePrincipals(mappedObject, newRoles);
/*     */     }
/*  94 */     this.result.setMappedObject(mappedObject);
/*     */   }
View Full Code Here

/*     */   private Group getGroupFromRoleSet(Set<Principal> roleset)
/*     */   {
/* 193 */     Group gp = new SimpleGroup("Roles");
/* 194 */     for (Principal p : roleset)
/*     */     {
/* 196 */       gp.addMember(p);
/*     */     }
/* 198 */     return gp;
/*     */   }
/*     */ }

View Full Code Here

      {
         StringTokenizer tokenizer = new StringTokenizer(roleNames, ",");
         while( tokenizer.hasMoreTokens() )
         {
            String roleName = tokenizer.nextToken();
            roles.addMember(new SimplePrincipal(roleName));
         }
      }
      return roleSets;
   }
}
View Full Code Here

    try
    {
      Group roles = new SimpleGroup("Roles");
      for (String role : this.identity.getRoles())
      {
        roles.addMember(this.createIdentity(role));
      }

      Group[] groups = { roles };

      return groups;
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.