Examples of SimpleGroup


Examples of org.jboss.security.SimpleGroup

    /**
     * @see org.jboss.security.auth.spi.AbstractServerLoginModule#getRoleSets()
     */
    @Override
    protected Group[] getRoleSets() throws LoginException {
        SimpleGroup roles = new SimpleGroup("Roles");

        //roles.addMember( new SimplePrincipal( "some user" ) );
        Group[] roleSets = { roles };
        return roleSets;
    }
View Full Code Here

Examples of org.jboss.security.SimpleGroup

    /**
     * @see org.jboss.security.auth.spi.AbstractServerLoginModule#getRoleSets()
     */
    @Override
    protected Group[] getRoleSets() throws LoginException {
        SimpleGroup roles = new SimpleGroup("Roles");

        //roles.addMember( new SimplePrincipal( "some user" ) );
        Group[] roleSets = { roles };
        return roleSets;
    }
View Full Code Here

Examples of org.jboss.security.SimpleGroup

    /**
     * @see org.jboss.security.auth.spi.AbstractServerLoginModule#getRoleSets()
     */
    protected Group[] getRoleSets() throws LoginException {
        SimpleGroup roles = new SimpleGroup("Roles");

        //roles.addMember( new SimplePrincipal( "some user" ) );
        Group[] roleSets = { roles };
        return roleSets;
    }
View Full Code Here

Examples of org.jboss.security.SimpleGroup

   public void testCloneNestableGroup() throws Exception
   {
      SimplePrincipal sp1 = new SimplePrincipal("sp1");
      SimplePrincipal sp2 = new SimplePrincipal("sp2");
     
      SimpleGroup sg1 = new SimpleGroup("sg1");
      SimpleGroup sg2 = new SimpleGroup("sg1");
      sg1.addMember(sp1);
      sg2.addMember(sp2);
      NestableGroup ng = new NestableGroup("TestGroup");
      //Add principals to the NestablePrincipal
      ng.addMember(sg1);
      ng.addMember(sg2);
      assertTrue("ng.isMember(sp2)", ng.isMember(sp2));
View Full Code Here

Examples of org.jboss.security.SimpleGroup

   public void testCloneSimpleGroup() throws Exception
   {
      SimplePrincipal sp1 = new SimplePrincipal("sp1");
      SimplePrincipal sp2 = new SimplePrincipal("sp2");
     
      SimpleGroup sg = new SimpleGroup("sg1");
      sg.addMember(sp1);
      sg.addMember(sp2);
      assertTrue("sg.isMember(sp1)", sg.isMember(sp1));
      assertTrue("sg.isMember(sp2)", sg.isMember(sp2));
     
      //Clone
      SimpleGroup clonedSP = (SimpleGroup)sg.clone();
      sg.removeMember(sp2);
     
      //Only the active principal is valid
      assertFalse("sg.isMember(sp2) == false", sg.isMember(sp2));
      assertTrue("sg.isMember(sp1)", sg.isMember(sp1));
      //Check that the cloned SimpleGroup is not affected
      assertTrue("clonedSP.isMember(sp2)", clonedSP.isMember(sp2))
   }
View Full Code Here

Examples of org.jboss.security.SimpleGroup

      assertTrue("Janitor can access window?", policy.implies(pd, callerperm));
   }
  
   protected ProtectionDomain getProtectionDomain(String username, String role) throws Exception
   {
      Group gp = new SimpleGroup("Roles");
      gp.addMember(new SimplePrincipal(role));
      Principal sp = new SimplePrincipal(username);
      prepareAndSetAuthenticatedSubject(sp,gp);
      return new ProtectionDomain(null,null,null,new Principal[] { sp,gp} );
   }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleGroup

                }

                if (!preAuthenticationGroups.isEmpty()) {
                    for (String group : preAuthenticationGroups.keySet()) {
                        for (String groupType : preAuthenticationGroups.get(group)) {
                            activeGroups.add(new SimpleGroup(group, groupType));
                        }
                    }
                    preAuthenticationGroups.clear();
                }
            }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleGroup

        if (roleType == null || "".equals(roleType) || group == null || "".equals(group)
                || groupType == null || "".equals(groupType)) return false;

        if (isLoggedIn()) {
            return activeRoles.add(new SimpleRole(new SimpleRoleType(roleType),
                    user, new SimpleGroup(group, groupType)));
        } else {
            List<String> roleTypes = null;

            Map<String, List<String>> groupTypes = preAuthenticationRoles.get(group);
            if (groupTypes != null) {
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleGroup

        if (name == null || "".equals(name) || groupType == null || "".equals(groupType)) {
            return false;
        }

        if (isLoggedIn()) {
            return activeGroups.add(new SimpleGroup(name, groupType));
        } else {
            List<String> groupTypes = null;
            if (preAuthenticationGroups.containsKey(name)) {
                groupTypes = preAuthenticationGroups.get(name);
            } else {
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleGroup

{

   @Override
   public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2)
   {
      return new SimpleGroup(arg2, "GROUP");
   }
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.