@Override
    public boolean isAvailable(final RegisteredService service) {
        try {
            val endpoints = client.getWsapiUrls();
            for (val endpoint : endpoints) {
                LOGGER.debug("Pinging YubiKey API endpoint at [{}]", endpoint);
                val msg = httpClient.sendMessageToEndPoint(new URI(endpoint).toURL());
                val message = Optional.ofNullable(msg).map(HttpMessage::getMessage).orElse(null);
                if (StringUtils.isNotBlank(message)) {
                    val response = EncodingUtils.urlDecode(message);
                    LOGGER.debug("Received YubiKey ping response [{}]", response);
                    return true;
                }
            }
        } catch (final Exception e) {
            LoggingUtils.warn(LOGGER, e);
        }
        return false;
    }
The authentication provider for yubikey.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-yubikey-core-mfa/src/main/java/org/apereo/cas/adaptors/yubikey/YubiKeyMultifactorAuthenticationProvider.java