private NewAccountCreatedDto buildApimanEvent(Event event, UserModel user) {
        OffsetDateTime time = OffsetDateTime.ofInstant(
             Instant.ofEpochMilli(user.getCreatedTimestamp()),
             ZoneId.of("UTC")
        );

        boolean approvalRequired = user
             .getRequiredActionsStream()
             .anyMatch(n -> n.equals(AccountApprovalRequiredActionFactory.PROVIDER_ID));

        // TODO(msavy): Does this cover all role permutations? Might need to consider groups etc also.
        Set<String> roles = user.getRoleMappingsStream().map(RoleModel::getName).collect(Collectors.toSet());

        return new NewAccountCreatedDto()
             .setUserId(event.getUserId())
             .setUsername(user.getUsername())
             .setEmailAddress(user.getEmail())
             .setFirstName(user.getFirstName())
             .setSurname(user.getLastName())
             .setTime(time)
             .setRoles(roles)
             .setAttributes(user.getAttributes())
             .setApprovalRequired(approvalRequired);
    }
Process a {@link org.keycloak.events.EventType#REGISTER} and send to Apiman Manager API via HTTP.
sso/keycloak/extensions/src/main/java/io/apiman/manager/sso/keycloak/event/processors/NewUserEventProcessor.java