Package org.apache.karaf.jaas.boot.principal

Examples of org.apache.karaf.jaas.boot.principal.GroupPrincipal


                }
            }
            assertEquals(1, engine.listGroups(upa).size());
            assertEquals(2, engine.listGroups(upb).size());

            GroupPrincipal gp = engine.listGroups(upa).iterator().next();
            engine.deleteGroupRole("g", "role2");
            assertEquals(1, engine.listRoles(gp).size());
            assertEquals("role3", engine.listRoles(gp).iterator().next().getName());

            // check that the user roles are reported correctly
View Full Code Here


        principals = new HashSet<Principal>();
        principals.add(new UserPrincipal(user));
        for (int i = 1; i < infos.length; i++) {
            if (infos[i].startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
                // it's a group reference
                principals.add(new GroupPrincipal(infos[i].substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
                String groupInfo = (String) users.get(infos[i]);
                if (groupInfo != null) {
                    String[] roles = groupInfo.split(",");
                    for (int j = 1; j < roles.length; j++) {
                        principals.add(new RolePrincipal(roles[j]));
View Full Code Here

        if (userInfo != null) {
            String[] infos = userInfo.split(",");
            for (int i = 1; i < infos.length; i++) {
                String name = infos[i];
                if (name.startsWith(GROUP_PREFIX)) {
                    result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length())));
                }
            }
        }
        return result;
    }
View Full Code Here

        principals = new HashSet<Principal>();
        principals.add(new UserPrincipal(user));
        for (int i = 1; i < infos.length; i++) {
            if (infos[i].startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
                // it's a group reference
                principals.add(new GroupPrincipal(infos[i].substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
                String groupInfo = (String) users.get(infos[i]);
                if (groupInfo != null) {
                    String[] roles = groupInfo.split(",");
                    for (int j = 1; j < roles.length; j++) {
                        principals.add(new RolePrincipal(roles[j]));
View Full Code Here

                }
            }
            assertEquals(1, engine.listGroups(upa).size());
            assertEquals(2, engine.listGroups(upb).size());

            GroupPrincipal gp = engine.listGroups(upa).iterator().next();
            engine.deleteGroupRole("g", "role2");
            assertEquals(1, engine.listRoles(gp).size());
            assertEquals("role3", engine.listRoles(gp).iterator().next().getName());

            // Check that the user roles are reported correctly
View Full Code Here

        principals = new HashSet<Principal>();
        principals.add(new UserPrincipal(user));
        for (int i = 1; i < infos.length; i++) {
            if (infos[i].trim().startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
                // it's a group reference
                principals.add(new GroupPrincipal(infos[i].trim().substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
                String groupInfo = (String) users.get(infos[i].trim());
                if (groupInfo != null) {
                    String[] roles = groupInfo.split(",");
                    for (int j = 1; j < roles.length; j++) {
                        principals.add(new RolePrincipal(roles[j].trim()));
View Full Code Here

        if (userInfo != null) {
            String[] infos = userInfo.split(",");
            for (int i = 1; i < infos.length; i++) {
                String name = infos[i];
                if (name.startsWith(GROUP_PREFIX)) {
                    result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length())));
                }
            }
        }
        return result;
    }
View Full Code Here

        principals = new HashSet<Principal>();
        principals.add(new UserPrincipal(user));
        for (int i = 1; i < infos.length; i++) {
            if (infos[i].trim().startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
                // it's a group reference
                principals.add(new GroupPrincipal(infos[i].trim().substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
                String groupInfo = (String) users.get(infos[i].trim());
                if (groupInfo != null) {
                    String[] roles = groupInfo.split(",");
                    for (int j = 1; j < roles.length; j++) {
                        principals.add(new RolePrincipal(roles[j].trim()));
View Full Code Here

        if (userInfo != null) {
            String[] infos = userInfo.split(",");
            for (int i = 1; i < infos.length; i++) {
                String name = infos[i];
                if (name.startsWith(GROUP_PREFIX)) {
                    result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length())));
                }
            }
        }
        return result;
    }
View Full Code Here

               if (userInfo != null) {
                       String[] infos = userInfo.split(",");
                       for (int i = 1; i < infos.length; i++) {
                               String name = infos[i];
                               if (name.startsWith(GROUP_PREFIX)) {
                                       result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length())));
                                   }
                           }
                   }
               return result;
           }
View Full Code Here

TOP

Related Classes of org.apache.karaf.jaas.boot.principal.GroupPrincipal

Copyright © 2018 www.massapicom. 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.