Search in sources :

Example 6 with Group

use of org.apache.syncope.ext.scimv2.api.data.Group in project syncope by apache.

the class SCIMITCase method createUser.

@Test
public void createUser() throws JsonProcessingException {
    assumeTrue(SCIMDetector.isSCIMAvailable(webClient()));
    scimConfService.set(CONF);
    SCIMUser user = getSampleUser(UUID.randomUUID().toString());
    user.getRoles().add(new Value("User reviewer"));
    user.getGroups().add(new Group("37d15e4c-cdc1-460b-a591-8505c8133806", null, null, null));
    Response response = webClient().path("Users").post(user);
    assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
    user = response.readEntity(SCIMUser.class);
    assertNotNull(user.getId());
    assertTrue(response.getLocation().toASCIIString().endsWith(user.getId()));
    UserTO userTO = userService.read(user.getId());
    assertEquals(user.getUserName(), userTO.getUsername());
    assertTrue(user.isActive());
    assertEquals(user.getDisplayName(), userTO.getDerAttr("cn").get().getValues().get(0));
    assertEquals(user.getName().getGivenName(), userTO.getPlainAttr("firstname").get().getValues().get(0));
    assertEquals(user.getName().getFamilyName(), userTO.getPlainAttr("surname").get().getValues().get(0));
    assertEquals(user.getName().getFormatted(), userTO.getPlainAttr("fullname").get().getValues().get(0));
    assertEquals(user.getEmails().get(0).getValue(), userTO.getPlainAttr("userId").get().getValues().get(0));
    assertEquals(user.getEmails().get(1).getValue(), userTO.getPlainAttr("email").get().getValues().get(0));
    assertEquals(user.getRoles().get(0).getValue(), userTO.getRoles().get(0));
    assertEquals(user.getGroups().get(0).getValue(), userTO.getMemberships().get(0).getGroupKey());
}
Also used : ListResponse(org.apache.syncope.ext.scimv2.api.data.ListResponse) Response(javax.ws.rs.core.Response) Group(org.apache.syncope.ext.scimv2.api.data.Group) SCIMGroup(org.apache.syncope.ext.scimv2.api.data.SCIMGroup) SCIMUser(org.apache.syncope.ext.scimv2.api.data.SCIMUser) UserTO(org.apache.syncope.common.lib.to.UserTO) SCIMComplexValue(org.apache.syncope.ext.scimv2.api.data.SCIMComplexValue) Value(org.apache.syncope.ext.scimv2.api.data.Value) Test(org.junit.jupiter.api.Test)

Example 7 with Group

use of org.apache.syncope.ext.scimv2.api.data.Group in project syncope by apache.

the class SCIMITCase method replaceGroup.

@Test
public void replaceGroup() {
    assumeTrue(SCIMDetector.isSCIMAvailable(webClient()));
    SCIMGroup group = new SCIMGroup(null, null, UUID.randomUUID().toString());
    group.getMembers().add(new Member("b3cbc78d-32e6-4bd4-92e0-bbe07566a2ee", null, null));
    Response response = webClient().path("Groups").post(group);
    assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
    group = response.readEntity(SCIMGroup.class);
    assertNotNull(group.getId());
    assertEquals(1, group.getMembers().size());
    assertEquals("b3cbc78d-32e6-4bd4-92e0-bbe07566a2ee", group.getMembers().get(0).getValue());
    group.setDisplayName("other" + group.getId());
    group.getMembers().add(new Member("c9b2dec2-00a7-4855-97c0-d854842b4b24", null, null));
    response = webClient().path("Groups").path(group.getId()).put(group);
    assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
    group = response.readEntity(SCIMGroup.class);
    assertTrue(group.getDisplayName().startsWith("other"));
    assertEquals(2, group.getMembers().size());
    group.getMembers().clear();
    group.getMembers().add(new Member("c9b2dec2-00a7-4855-97c0-d854842b4b24", null, null));
    response = webClient().path("Groups").path(group.getId()).put(group);
    assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
    group = response.readEntity(SCIMGroup.class);
    assertEquals(1, group.getMembers().size());
    assertEquals("c9b2dec2-00a7-4855-97c0-d854842b4b24", group.getMembers().get(0).getValue());
}
Also used : ListResponse(org.apache.syncope.ext.scimv2.api.data.ListResponse) Response(javax.ws.rs.core.Response) SCIMGroup(org.apache.syncope.ext.scimv2.api.data.SCIMGroup) Member(org.apache.syncope.ext.scimv2.api.data.Member) Test(org.junit.jupiter.api.Test)

Example 8 with Group

use of org.apache.syncope.ext.scimv2.api.data.Group in project syncope by apache.

the class GroupServiceImpl method create.

@Override
public Response create(final SCIMGroup group) {
    // first create group, no members assigned
    ProvisioningResult<GroupTO> result = groupLogic().create(binder().toGroupTO(group), false);
    // then assign members
    for (Member member : group.getMembers()) {
        UserPatch patch = new UserPatch();
        patch.setKey(member.getValue());
        patch.getMemberships().add(new MembershipPatch.Builder().operation(PatchOperation.ADD_REPLACE).group(result.getEntity().getKey()).build());
        try {
            userLogic().update(patch, false);
        } catch (Exception e) {
            LOG.error("While setting membership of {} to {}", result.getEntity().getKey(), member.getValue(), e);
        }
    }
    return createResponse(result.getEntity().getKey(), binder().toSCIMGroup(result.getEntity(), uriInfo.getAbsolutePathBuilder().path(result.getEntity().getKey()).build().toASCIIString(), Collections.<String>emptyList(), Collections.<String>emptyList()));
}
Also used : ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) Member(org.apache.syncope.ext.scimv2.api.data.Member) UserPatch(org.apache.syncope.common.lib.patch.UserPatch) BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) GroupTO(org.apache.syncope.common.lib.to.GroupTO)

Example 9 with Group

use of org.apache.syncope.ext.scimv2.api.data.Group in project syncope by apache.

the class GroupServiceImpl method replace.

@Override
public Response replace(final String id, final SCIMGroup group) {
    if (!id.equals(group.getId())) {
        throw new BadRequestException(ErrorType.invalidPath, "Expected " + id + ", found " + group.getId());
    }
    ResponseBuilder builder = checkETag(Resource.Group, id);
    if (builder != null) {
        return builder.build();
    }
    // save current group members
    Set<String> beforeMembers = new HashSet<>();
    MembershipCond membCond = new MembershipCond();
    membCond.setGroup(id);
    SearchCond searchCond = SearchCond.getLeafCond(membCond);
    int count = userLogic().search(searchCond, 1, 1, Collections.<OrderByClause>emptyList(), SyncopeConstants.ROOT_REALM, false).getLeft();
    for (int page = 1; page <= (count / AnyDAO.DEFAULT_PAGE_SIZE) + 1; page++) {
        beforeMembers.addAll(userLogic().search(searchCond, page, AnyDAO.DEFAULT_PAGE_SIZE, Collections.<OrderByClause>emptyList(), SyncopeConstants.ROOT_REALM, false).getRight().stream().map(EntityTO::getKey).collect(Collectors.toSet()));
    }
    // update group, don't change members
    ProvisioningResult<GroupTO> result = groupLogic().update(AnyOperations.diff(binder().toGroupTO(group), groupLogic().read(id), false), false);
    // assign new members
    Set<String> afterMembers = new HashSet<>();
    group.getMembers().forEach(member -> {
        afterMembers.add(member.getValue());
        if (!beforeMembers.contains(member.getValue())) {
            UserPatch patch = new UserPatch();
            patch.setKey(member.getValue());
            patch.getMemberships().add(new MembershipPatch.Builder().operation(PatchOperation.ADD_REPLACE).group(result.getEntity().getKey()).build());
            try {
                userLogic().update(patch, false);
            } catch (Exception e) {
                LOG.error("While setting membership of {} to {}", result.getEntity().getKey(), member.getValue(), e);
            }
        }
    });
    // remove unconfirmed members
    beforeMembers.stream().filter(member -> !afterMembers.contains(member)).forEach(user -> {
        UserPatch patch = new UserPatch();
        patch.setKey(user);
        patch.getMemberships().add(new MembershipPatch.Builder().operation(PatchOperation.DELETE).group(result.getEntity().getKey()).build());
        try {
            userLogic().update(patch, false);
        } catch (Exception e) {
            LOG.error("While removing membership of {} from {}", result.getEntity().getKey(), user, e);
        }
    });
    return updateResponse(result.getEntity().getKey(), binder().toSCIMGroup(result.getEntity(), uriInfo.getAbsolutePathBuilder().path(result.getEntity().getKey()).build().toASCIIString(), Collections.<String>emptyList(), Collections.<String>emptyList()));
}
Also used : Arrays(java.util.Arrays) BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) ErrorType(org.apache.syncope.ext.scimv2.api.type.ErrorType) OrderByClause(org.apache.syncope.core.persistence.api.dao.search.OrderByClause) ArrayUtils(org.apache.commons.lang3.ArrayUtils) UserPatch(org.apache.syncope.common.lib.patch.UserPatch) ProvisioningResult(org.apache.syncope.common.lib.to.ProvisioningResult) StringUtils(org.apache.commons.lang3.StringUtils) HashSet(java.util.HashSet) MembershipPatch(org.apache.syncope.common.lib.patch.MembershipPatch) EntityTO(org.apache.syncope.common.lib.to.EntityTO) SortOrder(org.apache.syncope.ext.scimv2.api.type.SortOrder) ListResponse(org.apache.syncope.ext.scimv2.api.data.ListResponse) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) SyncopeConstants(org.apache.syncope.common.lib.SyncopeConstants) SCIMGroup(org.apache.syncope.ext.scimv2.api.data.SCIMGroup) SearchCond(org.apache.syncope.core.persistence.api.dao.search.SearchCond) Set(java.util.Set) GroupTO(org.apache.syncope.common.lib.to.GroupTO) Collectors(java.util.stream.Collectors) Resource(org.apache.syncope.ext.scimv2.api.type.Resource) Response(javax.ws.rs.core.Response) AnyDAO(org.apache.syncope.core.persistence.api.dao.AnyDAO) PatchOperation(org.apache.syncope.common.lib.types.PatchOperation) SCIMSearchRequest(org.apache.syncope.ext.scimv2.api.data.SCIMSearchRequest) Member(org.apache.syncope.ext.scimv2.api.data.Member) GroupService(org.apache.syncope.ext.scimv2.api.service.GroupService) MembershipCond(org.apache.syncope.core.persistence.api.dao.search.MembershipCond) Collections(java.util.Collections) AnyOperations(org.apache.syncope.common.lib.AnyOperations) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) MembershipCond(org.apache.syncope.core.persistence.api.dao.search.MembershipCond) UserPatch(org.apache.syncope.common.lib.patch.UserPatch) BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) GroupTO(org.apache.syncope.common.lib.to.GroupTO) EntityTO(org.apache.syncope.common.lib.to.EntityTO) OrderByClause(org.apache.syncope.core.persistence.api.dao.search.OrderByClause) BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) SearchCond(org.apache.syncope.core.persistence.api.dao.search.SearchCond) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) HashSet(java.util.HashSet)

Example 10 with Group

use of org.apache.syncope.ext.scimv2.api.data.Group in project syncope by apache.

the class SCIMDataBinder method toSCIMUser.

public SCIMUser toSCIMUser(final UserTO userTO, final String location, final List<String> attributes, final List<String> excludedAttributes) {
    SCIMConf conf = confManager.get();
    List<String> schemas = new ArrayList<>();
    schemas.add(Resource.User.schema());
    if (conf.getEnterpriseUserConf() != null) {
        schemas.add(Resource.EnterpriseUser.schema());
    }
    SCIMUser user = new SCIMUser(userTO.getKey(), schemas, new Meta(Resource.User, userTO.getCreationDate(), userTO.getLastChangeDate() == null ? userTO.getCreationDate() : userTO.getLastChangeDate(), userTO.getETagValue(), location), output(attributes, excludedAttributes, "userName", userTO.getUsername()), !userTO.isSuspended());
    Map<String, AttrTO> attrs = new HashMap<>();
    attrs.putAll(EntityTOUtils.buildAttrMap(userTO.getPlainAttrs()));
    attrs.putAll(EntityTOUtils.buildAttrMap(userTO.getDerAttrs()));
    attrs.putAll(EntityTOUtils.buildAttrMap(userTO.getVirAttrs()));
    if (conf.getUserConf() != null) {
        if (output(attributes, excludedAttributes, "name") && conf.getUserConf().getName() != null) {
            SCIMUserName name = new SCIMUserName();
            if (conf.getUserConf().getName().getFamilyName() != null && attrs.containsKey(conf.getUserConf().getName().getFamilyName())) {
                name.setFamilyName(attrs.get(conf.getUserConf().getName().getFamilyName()).getValues().get(0));
            }
            if (conf.getUserConf().getName().getFormatted() != null && attrs.containsKey(conf.getUserConf().getName().getFormatted())) {
                name.setFormatted(attrs.get(conf.getUserConf().getName().getFormatted()).getValues().get(0));
            }
            if (conf.getUserConf().getName().getGivenName() != null && attrs.containsKey(conf.getUserConf().getName().getGivenName())) {
                name.setGivenName(attrs.get(conf.getUserConf().getName().getGivenName()).getValues().get(0));
            }
            if (conf.getUserConf().getName().getHonorificPrefix() != null && attrs.containsKey(conf.getUserConf().getName().getHonorificPrefix())) {
                name.setHonorificPrefix(attrs.get(conf.getUserConf().getName().getHonorificPrefix()).getValues().get(0));
            }
            if (conf.getUserConf().getName().getHonorificSuffix() != null && attrs.containsKey(conf.getUserConf().getName().getHonorificSuffix())) {
                name.setHonorificSuffix(attrs.get(conf.getUserConf().getName().getHonorificSuffix()).getValues().get(0));
            }
            if (conf.getUserConf().getName().getMiddleName() != null && attrs.containsKey(conf.getUserConf().getName().getMiddleName())) {
                name.setMiddleName(attrs.get(conf.getUserConf().getName().getMiddleName()).getValues().get(0));
            }
            if (!name.isEmpty()) {
                user.setName(name);
            }
        }
        if (output(attributes, excludedAttributes, "displayName") && conf.getUserConf().getDisplayName() != null && attrs.containsKey(conf.getUserConf().getDisplayName())) {
            user.setDisplayName(attrs.get(conf.getUserConf().getDisplayName()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "nickName") && conf.getUserConf().getNickName() != null && attrs.containsKey(conf.getUserConf().getNickName())) {
            user.setNickName(attrs.get(conf.getUserConf().getNickName()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "profileUrl") && conf.getUserConf().getProfileUrl() != null && attrs.containsKey(conf.getUserConf().getProfileUrl())) {
            user.setProfileUrl(attrs.get(conf.getUserConf().getProfileUrl()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "title") && conf.getUserConf().getTitle() != null && attrs.containsKey(conf.getUserConf().getTitle())) {
            user.setTitle(attrs.get(conf.getUserConf().getTitle()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "userType") && conf.getUserConf().getUserType() != null && attrs.containsKey(conf.getUserConf().getUserType())) {
            user.setUserType(attrs.get(conf.getUserConf().getUserType()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "preferredLanguage") && conf.getUserConf().getPreferredLanguage() != null && attrs.containsKey(conf.getUserConf().getPreferredLanguage())) {
            user.setPreferredLanguage(attrs.get(conf.getUserConf().getPreferredLanguage()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "locale") && conf.getUserConf().getLocale() != null && attrs.containsKey(conf.getUserConf().getLocale())) {
            user.setLocale(attrs.get(conf.getUserConf().getLocale()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "timezone") && conf.getUserConf().getTimezone() != null && attrs.containsKey(conf.getUserConf().getTimezone())) {
            user.setTimezone(attrs.get(conf.getUserConf().getTimezone()).getValues().get(0));
        }
        if (output(attributes, excludedAttributes, "emails")) {
            fill(attrs, conf.getUserConf().getEmails(), user.getEmails());
        }
        if (output(attributes, excludedAttributes, "phoneNumbers")) {
            fill(attrs, conf.getUserConf().getPhoneNumbers(), user.getPhoneNumbers());
        }
        if (output(attributes, excludedAttributes, "ims")) {
            fill(attrs, conf.getUserConf().getIms(), user.getIms());
        }
        if (output(attributes, excludedAttributes, "photos")) {
            fill(attrs, conf.getUserConf().getPhotos(), user.getPhotos());
        }
        if (output(attributes, excludedAttributes, "addresses")) {
            conf.getUserConf().getAddresses().forEach(addressConf -> {
                SCIMUserAddress address = new SCIMUserAddress();
                if (addressConf.getFormatted() != null && attrs.containsKey(addressConf.getFormatted())) {
                    address.setFormatted(attrs.get(addressConf.getFormatted()).getValues().get(0));
                }
                if (addressConf.getStreetAddress() != null && attrs.containsKey(addressConf.getStreetAddress())) {
                    address.setStreetAddress(attrs.get(addressConf.getStreetAddress()).getValues().get(0));
                }
                if (addressConf.getLocality() != null && attrs.containsKey(addressConf.getLocality())) {
                    address.setLocality(attrs.get(addressConf.getLocality()).getValues().get(0));
                }
                if (addressConf.getRegion() != null && attrs.containsKey(addressConf.getRegion())) {
                    address.setRegion(attrs.get(addressConf.getRegion()).getValues().get(0));
                }
                if (addressConf.getCountry() != null && attrs.containsKey(addressConf.getCountry())) {
                    address.setCountry(attrs.get(addressConf.getCountry()).getValues().get(0));
                }
                if (addressConf.getType() != null) {
                    address.setType(addressConf.getType().name());
                }
                if (addressConf.isPrimary()) {
                    address.setPrimary(true);
                }
                if (!address.isEmpty()) {
                    user.getAddresses().add(address);
                }
            });
        }
        if (output(attributes, excludedAttributes, "x509Certificates")) {
            conf.getUserConf().getX509Certificates().stream().filter(certificate -> attrs.containsKey(certificate)).forEachOrdered(certificate -> {
                user.getX509Certificates().add(new Value(attrs.get(certificate).getValues().get(0)));
            });
        }
        if (conf.getEnterpriseUserConf() != null) {
            SCIMEnterpriseInfo enterpriseInfo = new SCIMEnterpriseInfo();
            if (output(attributes, excludedAttributes, "employeeNumber") && conf.getEnterpriseUserConf().getEmployeeNumber() != null && attrs.containsKey(conf.getEnterpriseUserConf().getEmployeeNumber())) {
                enterpriseInfo.setEmployeeNumber(attrs.get(conf.getEnterpriseUserConf().getEmployeeNumber()).getValues().get(0));
            }
            if (output(attributes, excludedAttributes, "costCenter") && conf.getEnterpriseUserConf().getCostCenter() != null && attrs.containsKey(conf.getEnterpriseUserConf().getCostCenter())) {
                enterpriseInfo.setCostCenter(attrs.get(conf.getEnterpriseUserConf().getCostCenter()).getValues().get(0));
            }
            if (output(attributes, excludedAttributes, "organization") && conf.getEnterpriseUserConf().getOrganization() != null && attrs.containsKey(conf.getEnterpriseUserConf().getOrganization())) {
                enterpriseInfo.setOrganization(attrs.get(conf.getEnterpriseUserConf().getOrganization()).getValues().get(0));
            }
            if (output(attributes, excludedAttributes, "division") && conf.getEnterpriseUserConf().getDivision() != null && attrs.containsKey(conf.getEnterpriseUserConf().getDivision())) {
                enterpriseInfo.setDivision(attrs.get(conf.getEnterpriseUserConf().getDivision()).getValues().get(0));
            }
            if (output(attributes, excludedAttributes, "department") && conf.getEnterpriseUserConf().getDepartment() != null && attrs.containsKey(conf.getEnterpriseUserConf().getDepartment())) {
                enterpriseInfo.setDepartment(attrs.get(conf.getEnterpriseUserConf().getDepartment()).getValues().get(0));
            }
            if (output(attributes, excludedAttributes, "manager") && conf.getEnterpriseUserConf().getManager() != null) {
                SCIMUserManager manager = new SCIMUserManager();
                if (conf.getEnterpriseUserConf().getManager().getKey() != null && attrs.containsKey(conf.getEnterpriseUserConf().getManager().getKey())) {
                    try {
                        UserTO userManager = userLogic.read(attrs.get(conf.getEnterpriseUserConf().getManager().getKey()).getValues().get(0));
                        manager.setValue(userManager.getKey());
                        manager.setRef(StringUtils.substringBefore(location, "/Users") + "/Users/" + userManager.getKey());
                        if (conf.getEnterpriseUserConf().getManager().getDisplayName() != null) {
                            AttrTO displayName = userManager.getPlainAttr(conf.getEnterpriseUserConf().getManager().getDisplayName()).orElse(null);
                            if (displayName == null) {
                                displayName = userManager.getDerAttr(conf.getEnterpriseUserConf().getManager().getDisplayName()).orElse(null);
                            }
                            if (displayName == null) {
                                displayName = userManager.getVirAttr(conf.getEnterpriseUserConf().getManager().getDisplayName()).orElse(null);
                            }
                            if (displayName != null) {
                                manager.setDisplayName(displayName.getValues().get(0));
                            }
                        }
                    } catch (Exception e) {
                        LOG.error("Could not read user {}", conf.getEnterpriseUserConf().getManager().getKey(), e);
                    }
                }
                if (!manager.isEmpty()) {
                    enterpriseInfo.setManager(manager);
                }
            }
            if (!enterpriseInfo.isEmpty()) {
                user.setEnterpriseInfo(enterpriseInfo);
            }
        }
        if (output(attributes, excludedAttributes, "groups")) {
            userTO.getMemberships().forEach(membership -> {
                user.getGroups().add(new Group(membership.getGroupKey(), StringUtils.substringBefore(location, "/Users") + "/Groups/" + membership.getGroupKey(), membership.getGroupName(), Function.direct));
            });
            userTO.getDynMemberships().forEach(membership -> {
                user.getGroups().add(new Group(membership.getGroupKey(), StringUtils.substringBefore(location, "/Users") + "/Groups/" + membership.getGroupKey(), membership.getGroupName(), Function.indirect));
            });
        }
        if (output(attributes, excludedAttributes, "entitlements")) {
            authDataAccessor.getAuthorities(userTO.getUsername()).forEach(authority -> {
                user.getEntitlements().add(new Value(authority.getAuthority() + " on Realm(s) " + authority.getRealms()));
            });
        }
        if (output(attributes, excludedAttributes, "roles")) {
            userTO.getRoles().forEach(role -> {
                user.getRoles().add(new Value(role));
            });
        }
    }
    return user;
}
Also used : Arrays(java.util.Arrays) BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) Group(org.apache.syncope.ext.scimv2.api.data.Group) AttrTO(org.apache.syncope.common.lib.to.AttrTO) EntityTOUtils(org.apache.syncope.common.lib.EntityTOUtils) SCIMUserAddressConf(org.apache.syncope.common.lib.scim.SCIMUserAddressConf) ErrorType(org.apache.syncope.ext.scimv2.api.type.ErrorType) LoggerFactory(org.slf4j.LoggerFactory) OrderByClause(org.apache.syncope.core.persistence.api.dao.search.OrderByClause) SCIMUserAddress(org.apache.syncope.ext.scimv2.api.data.SCIMUserAddress) Autowired(org.springframework.beans.factory.annotation.Autowired) HashMap(java.util.HashMap) StringUtils(org.apache.commons.lang3.StringUtils) ArrayList(java.util.ArrayList) Map(java.util.Map) SCIMUserManager(org.apache.syncope.ext.scimv2.api.data.SCIMUserManager) MembershipTO(org.apache.syncope.common.lib.to.MembershipTO) SCIMComplexValue(org.apache.syncope.ext.scimv2.api.data.SCIMComplexValue) SyncopeConstants(org.apache.syncope.common.lib.SyncopeConstants) SCIMGroup(org.apache.syncope.ext.scimv2.api.data.SCIMGroup) Logger(org.slf4j.Logger) SearchCond(org.apache.syncope.core.persistence.api.dao.search.SearchCond) Value(org.apache.syncope.ext.scimv2.api.data.Value) SCIMUserName(org.apache.syncope.ext.scimv2.api.data.SCIMUserName) SCIMEnterpriseInfo(org.apache.syncope.ext.scimv2.api.data.SCIMEnterpriseInfo) Set(java.util.Set) GroupTO(org.apache.syncope.common.lib.to.GroupTO) AuthDataAccessor(org.apache.syncope.core.spring.security.AuthDataAccessor) Function(org.apache.syncope.ext.scimv2.api.type.Function) SCIMUser(org.apache.syncope.ext.scimv2.api.data.SCIMUser) List(java.util.List) Meta(org.apache.syncope.ext.scimv2.api.data.Meta) Component(org.springframework.stereotype.Component) Resource(org.apache.syncope.ext.scimv2.api.type.Resource) SCIMComplexConf(org.apache.syncope.common.lib.scim.SCIMComplexConf) SCIMConf(org.apache.syncope.common.lib.scim.SCIMConf) AnyDAO(org.apache.syncope.core.persistence.api.dao.AnyDAO) SCIMConfManager(org.apache.syncope.core.logic.scim.SCIMConfManager) Member(org.apache.syncope.ext.scimv2.api.data.Member) Optional(java.util.Optional) UserTO(org.apache.syncope.common.lib.to.UserTO) MembershipCond(org.apache.syncope.core.persistence.api.dao.search.MembershipCond) Collections(java.util.Collections) Meta(org.apache.syncope.ext.scimv2.api.data.Meta) SCIMUserManager(org.apache.syncope.ext.scimv2.api.data.SCIMUserManager) Group(org.apache.syncope.ext.scimv2.api.data.Group) SCIMGroup(org.apache.syncope.ext.scimv2.api.data.SCIMGroup) SCIMUser(org.apache.syncope.ext.scimv2.api.data.SCIMUser) HashMap(java.util.HashMap) SCIMUserName(org.apache.syncope.ext.scimv2.api.data.SCIMUserName) ArrayList(java.util.ArrayList) AttrTO(org.apache.syncope.common.lib.to.AttrTO) SCIMUserAddress(org.apache.syncope.ext.scimv2.api.data.SCIMUserAddress) SCIMConf(org.apache.syncope.common.lib.scim.SCIMConf) SCIMEnterpriseInfo(org.apache.syncope.ext.scimv2.api.data.SCIMEnterpriseInfo) BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) UserTO(org.apache.syncope.common.lib.to.UserTO) SCIMComplexValue(org.apache.syncope.ext.scimv2.api.data.SCIMComplexValue) Value(org.apache.syncope.ext.scimv2.api.data.Value)

Aggregations

SCIMGroup (org.apache.syncope.ext.scimv2.api.data.SCIMGroup)9 Member (org.apache.syncope.ext.scimv2.api.data.Member)7 Response (javax.ws.rs.core.Response)6 ListResponse (org.apache.syncope.ext.scimv2.api.data.ListResponse)6 GroupTO (org.apache.syncope.common.lib.to.GroupTO)5 BadRequestException (org.apache.syncope.ext.scimv2.api.BadRequestException)5 UserTO (org.apache.syncope.common.lib.to.UserTO)4 MembershipCond (org.apache.syncope.core.persistence.api.dao.search.MembershipCond)4 OrderByClause (org.apache.syncope.core.persistence.api.dao.search.OrderByClause)4 SearchCond (org.apache.syncope.core.persistence.api.dao.search.SearchCond)4 Meta (org.apache.syncope.ext.scimv2.api.data.Meta)4 SCIMUser (org.apache.syncope.ext.scimv2.api.data.SCIMUser)4 Test (org.junit.jupiter.api.Test)4 Arrays (java.util.Arrays)3 Collections (java.util.Collections)3 Set (java.util.Set)3 StringUtils (org.apache.commons.lang3.StringUtils)3 SyncopeConstants (org.apache.syncope.common.lib.SyncopeConstants)3 AnyDAO (org.apache.syncope.core.persistence.api.dao.AnyDAO)3 Group (org.apache.syncope.ext.scimv2.api.data.Group)3