@Operation(summary = "Import a Yubikey account as a JSON document")
    @PostMapping(path = "/import", consumes = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity importAccount(final HttpServletRequest request) throws Exception {
        try (val is = request.getInputStream()) {
            val requestBody = IOUtils.toString(is, StandardCharsets.UTF_8);
            LOGGER.trace("Submitted account: [{}]", requestBody);
            val account = MAPPER.readValue(requestBody, new TypeReference<YubiKeyDeviceRegistrationRequest>() {
            });
            LOGGER.trace("Storing account: [{}]", account);
            registry.getObject().registerAccountFor(account);
            return ResponseEntity.status(HttpStatus.CREATED).build();
        }
    }
Import account.

@param request the request
@return the http status
@throws Exception the exception
support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/registry/YubiKeyAccountRegistryEndpoint.java