@Override
    protected AuthenticationHandlerExecutionResult doAuthentication(final Credential credential, final Service service) throws Throwable {
        val radiusCredential = (RadiusTokenCredential) credential;
        val password = radiusCredential.getToken();
        val authentication = FunctionUtils.throwIfNull(WebUtils.getInProgressAuthentication(),
            () -> new FailedLoginException("CAS has no reference to an authentication event to locate a principal"));
        val principal = authentication.getPrincipal();
        val username = principal.getId();

        var state = Optional.empty();
        val attributes = principal.getAttributes();
        if (attributes.containsKey(Attr_State.NAME)) {
            LOGGER.debug("Found state attribute in principal attributes for multifactor authentication");
            val stateValue = CollectionUtils.firstElement(attributes.get(Attr_State.NAME));
            if (stateValue.isPresent()) {
                val stateAttr = (AttributeValue) stateValue.get();
                state = Optional.of(stateAttr.getValueObject());
            }
        }
        val result = RadiusUtils.authenticate(username, password, this.servers,
            failoverOnAuthenticationFailure, this.failoverOnException, state);
        if (result.getKey()) {
            val radiusAttributes = CollectionUtils.toMultiValuedMap(result.getValue().orElseThrow());
            val finalPrincipal = principalFactory.createPrincipal(username, radiusAttributes);
            return createHandlerResult(credential, finalPrincipal, new ArrayList<>());
        }
        throw new FailedLoginException("Radius authentication failed for user " + username);
    }
This is {@link RadiusTokenAuthenticationHandler}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-radius-mfa/src/main/java/org/apereo/cas/adaptors/radius/authentication/RadiusTokenAuthenticationHandler.java