use of com.unboundid.scim2.common.types.UserResource in project cas by apereo.
the class ScimV2PrincipalProvisioner method createUserResource.
/**
* Create user resource boolean.
*
* @param principal the principal
* @param credential the credential
* @param registeredService the registered service
* @return true /false
* @throws Exception the exception
*/
protected boolean createUserResource(final Principal principal, final Credential credential, final Optional<RegisteredService> registeredService) throws Exception {
val user = new UserResource();
mapper.map(user, principal, credential);
LOGGER.trace("Creating user resource [{}]", user);
return getScimService(registeredService).create("Users", user) != null;
}
Aggregations