@Override
    protected AuthenticationHandlerExecutionResult doAuthentication(final Credential credential,
                                                                    final Service service) throws Exception {
        return FunctionUtils.doAndThrow(() -> {
            val tokenCredential = (CasTwilioMultifactorTokenCredential) credential;
            val authentication = tokenCredential.getCredentialMetadata().getProperty(Authentication.class.getName(), Authentication.class);
            tokenCredential.getCredentialMetadata().removeProperty(Authentication.class.getName());
            val resolvedPrincipal = resolvePrincipal(applicationContext, authentication.getPrincipal());
            val principal = casTwilioMultifactorAuthenticationService.validate(resolvedPrincipal, tokenCredential);
            return createHandlerResult(tokenCredential, principal);
        }, MultifactorAuthenticationFailedException::new);
    }
This is {@link CasTwilioMultifactorAuthenticationHandler}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-twilio-mfa/src/main/java/org/apereo/cas/mfa/twilio/CasTwilioMultifactorAuthenticationHandler.java