@Override
    public boolean isYubiKeyRegisteredFor(final String uid, final String yubikeyPublicId) {
        if (devices.containsKey(uid)) {
            val account = devices.get(uid);
            return account.getDevices()
                .stream()
                .map(device -> decodeYubikeyRegisteredDevice(device.getPublicId()))
                .filter(Objects::nonNull)
                .anyMatch(publicId -> publicId.equals(yubikeyPublicId));
        }
        return false;
    }
This is {@link PermissiveYubiKeyAccountRegistry}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-yubikey-core/src/main/java/org/apereo/cas/adaptors/yubikey/registry/PermissiveYubiKeyAccountRegistry.java