@Override
    public List<Credential> fromRequest(final HttpServletRequest request,
                                        final MultiValueMap<String, String> requestBody) throws Throwable {
        if (requestBody == null || requestBody.isEmpty()) {
            LOGGER.debug("Skipping [{}] because the request body is null or empty", getClass().getSimpleName());
            return new ArrayList<>();
        }
        if (!requestBody.containsKey(RestHttpRequestCredentialFactory.PARAMETER_USERNAME) || !requestBody.containsKey(PARAMETER_NAME_PASSCODE)) {
            LOGGER.debug("No username or passcode provided");
            return new ArrayList<>();
        }
        val username = FunctionUtils.throwIfBlank(requestBody.getFirst(RestHttpRequestCredentialFactory.PARAMETER_USERNAME));
        val token = FunctionUtils.throwIfBlank(requestBody.getFirst(PARAMETER_NAME_PASSCODE));

        val providerId = StringUtils.defaultIfBlank(requestBody.getFirst(PARAMETER_NAME_PROVIDER),
            DuoSecurityMultifactorAuthenticationProperties.DEFAULT_IDENTIFIER);
        val credential = new DuoSecurityPasscodeCredential(username, token, providerId);
        val credentialMetadata = new BasicCredentialMetadata(credential);
        credentialMetadata.setTenant(tenantExtractor.extract(request).map(TenantDefinition::getId).orElse(null));
        return CollectionUtils.wrap(prepareCredential(request, credential));
    }
Identifier for the duo mfa provider.
support/cas-server-support-duo-core-mfa/src/main/java/org/apereo/cas/adaptors/duo/rest/DuoSecurityRestHttpRequestCredentialFactory.java