Package org.switchyard.security.principal

Examples of org.switchyard.security.principal.GroupPrincipal.addMember()


    private Set<Credential> getCredentials() throws Exception {
        UserPrincipal user = new UserPrincipal("testUser");
        RolePrincipal role = new RolePrincipal("testRole");
        GroupPrincipal parentGroup = new GroupPrincipal("testParentGroup");
        parentGroup.addMember(user);
        GroupPrincipal childGroup = new GroupPrincipal("testChildGroup");
        childGroup.addMember(role);
        parentGroup.addMember(childGroup);
        Set<Credential> creds = new LinkedHashSet<Credential>();
        creds.add(new AssertionCredential(new ElementPuller().pull(new StringReader("<testAssertion/>"))));
View Full Code Here


        UserPrincipal user = new UserPrincipal("testUser");
        RolePrincipal role = new RolePrincipal("testRole");
        GroupPrincipal parentGroup = new GroupPrincipal("testParentGroup");
        parentGroup.addMember(user);
        GroupPrincipal childGroup = new GroupPrincipal("testChildGroup");
        childGroup.addMember(role);
        parentGroup.addMember(childGroup);
        Set<Credential> creds = new LinkedHashSet<Credential>();
        creds.add(new AssertionCredential(new ElementPuller().pull(new StringReader("<testAssertion/>"))));
        creds.add(SOAPMessageCredentialExtractorTests.getBinarySecurityTokenCertificateCredential());
        creds.add(new ConfidentialityCredential(true));
View Full Code Here

                Set<String> roleNames = Strings.uniqueSplitTrimToNull(rolesProperties.getProperty(userName), ",");
                for (String roleName : roleNames) {
                    RolePrincipal role = new RolePrincipal(roleName);
                    if (groups.isEmpty()) {
                        GroupPrincipal rolesGroup = new GroupPrincipal(GroupPrincipal.ROLES);
                        rolesGroup.addMember(role);
                        getSubject().getPrincipals().add(rolesGroup);
                    } else {
                        for (GroupPrincipal group : groups) {
                            if (GroupPrincipal.ROLES.equals(group.getName())) {
                                group.addMember(role);
View Full Code Here

                        GroupPrincipal roles = null;
                        for (Role role : roleGroup.getRoles()) {
                            if (roles == null) {
                                roles = new GroupPrincipal(GroupPrincipal.ROLES);
                            }
                            roles.addMember(new RolePrincipal(role.getRoleName()));
                        }
                        if (roles != null) {
                            sts_subject.getPrincipals().add(roles);
                            sts_mapped = true;
                        }
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.