private YubiKeyRegisteredDevice decodeYubiKeyRegisteredDevice(final YubiKeyAccount account,
                                                                  final YubiKeyRegisteredDevice device) {
        val pubId = decodeYubikeyRegisteredDevice(device.getPublicId());
        if (StringUtils.isNotBlank(pubId)) {
            device.setPublicId(pubId);
            return device;
        }
        delete(account.getUsername(), device.getId());
        return null;
    }
Update.

@param account the account
@return true/false
support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/registry/BaseYubiKeyAccountRegistry.java