/** * Return a SCIMUser object as defined in SCIM schema * * @return */ public User createUser() { return new User(); }
break; case SCIMCommonConstants.USER: scimObject = new User(); log.debug("Building User Object"); break;
break; case SCIMCommonConstants.USER: scimObject = new User(); log.debug("Building User Object"); break;
scimObject = new User(); if (debug) { log.debug("Building User Object");
scimObject = new User(); if (log.isDebugEnabled()) { log.debug("Building User Object");
/** * Deletes the user. * * @param userEntity * @throws IdentityProvisioningException */ private void deleteUser(ProvisioningEntity userEntity) throws IdentityProvisioningException { String userName = null; try { List<String> userNames = getUserNames(userEntity.getAttributes()); if (CollectionUtils.isNotEmpty(userNames)) { userName = userNames.get(0); } User user = new User(); user.setUserName(userName); ProvisioningClient scimProvsioningClient = new ProvisioningClient(scimProvider, user, null); scimProvsioningClient.provisionDeleteUser(); } catch (Exception e) { throw new IdentityProvisioningException("Error while deleting user : " + userName, e); } }
/** * This is to decode SCIM Response received for a SCIM List/Filter requests. * * @param scimResponse * @param format * @param containedResourceType * @return */ public List<SCIMObject> decodeSCIMResponseWithListedResource(String scimResponse, String format, int containedResourceType) throws CharonException, BadRequestException { if ((format.equals(SCIMConstants.JSON)) && (jsonDecoder != null)) { SCIMDecoder scimDecoder = new SCIMDecoder(); switch (containedResourceType) { case 1: return scimDecoder.decodeListedResource(scimResponse, SCIMSchemaDefinitions.SCIM_USER_SCHEMA, new User()); case 2: return scimDecoder.decodeListedResource(scimResponse, SCIMSchemaDefinitions.SCIM_GROUP_SCHEMA, new Group()); default: throw new CharonException("Resource type didn't match any existing types."); } } else { throw new CharonException("Encoder in the given format is not properly initialized."); } }
private SCIMObject decodeSCIMResponse(String scimResponse, JSONDecoder decoder, int resourceType) throws AbstractCharonException { switch (resourceType) { case 1: User userObject = (User) decoder.decodeResource(scimResponse, SCIMSchemaDefinitions.SCIM_USER_SCHEMA, new User()); ClientSideValidator.validateRetrievedSCIMObject(userObject, SCIMSchemaDefinitions.SCIM_USER_SCHEMA); return userObject; case 2: Group groupObject = (Group) decoder.decodeResource(scimResponse, SCIMSchemaDefinitions.SCIM_GROUP_SCHEMA, new Group()); ClientSideValidator.validateRetrievedSCIMObject(groupObject, SCIMSchemaDefinitions.SCIM_GROUP_SCHEMA); return groupObject; default: throw new CharonException("Resource type didn't match any existing types."); } }
user = (User) SCIMClaimResolver.constructSCIMObjectFromAttributes(singleValued, 1); } else { user = new User();