public void delete(final String username, final long deviceId) {
        val accounts = getAccounts(username);
        if (!accounts.isEmpty()) {
            val account = accounts.getFirst();
            if (account != null && account.getDevices().removeIf(device -> device.getId() == deviceId)) {
                update(account);
            }
        }
    }
Delete.

@param username the username
@param deviceId the device id
support/cas-server-support-yubikey-dynamodb/src/main/java/org/apereo/cas/adaptors/yubikey/dao/DynamoDbYubiKeyFacilitator.java