Examples of STSGroupMappingProvider


Examples of org.picketlink.identity.federation.bindings.jboss.auth.mapping.STSGroupMappingProvider

                    Principal principal = principalResult.getMappedObject();
                    if (principal != null) {
                        sts_subject.getPrincipals().add(new UserPrincipal(principal.getName()));
                        sts_mapped = true;
                    }
                    STSGroupMappingProvider rolesMapper = new STSGroupMappingProvider();
                    rolesMapper.init(contextMap);
                    MappingResult<RoleGroup> rolesResult = new MappingResult<RoleGroup>();
                    rolesMapper.setMappingResult(rolesResult);
                    rolesMapper.performMapping(contextMap, null);
                    RoleGroup roleGroup = rolesResult.getMappedObject();
                    if (roleGroup != null) {
                        GroupPrincipal roles = null;
                        for (Role role : roleGroup.getRoles()) {
                            if (roles == null) {
View Full Code Here

Examples of org.picketlink.identity.federation.bindings.jboss.auth.mapping.STSGroupMappingProvider

        MappingResult<RoleGroup> mappingResult = new MappingResult<RoleGroup>();
        Map<String, Object> contextMap = new HashMap<String, Object>();
        contextMap.put("token-role-attribute-name", roleAttributeName);
        contextMap.put(AbstractSTSLoginModule.SHARED_TOKEN, SAMLUtil.toElement(assertion));

        MappingProvider<RoleGroup> mappingProvider = new STSGroupMappingProvider();
        mappingProvider.init(contextMap);
        mappingProvider.setMappingResult(mappingResult);
        mappingProvider.performMapping(contextMap, null);

        RoleGroup roleGroup = mappingResult.getMappedObject();
        assertNotNull("Unexpected null mapped role", roleGroup);
        assertEquals("RoleGroup name has unexpected value", SAML20TokenRoleAttributeProvider.JBOSS_ROLE_PRINCIPAL_NAME,
                roleGroup.getRoleName());
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.