protected String getDuoPrincipalId(final DuoSecurityUniversalPromptCredential duoCredential) {
        val principal = resolvePrincipal(duoCredential.getAuthentication().getPrincipal());
        val principalAttribute = properties.getPrincipalAttribute();
        if (principal.getAttributes().containsKey(principalAttribute)) {
            return principal.getAttributes().get(principalAttribute).getFirst().toString();
        }
        return principal.getId();
    }
An abstraction that encapsulates interaction with
Duo 2fa authentication service via its universal prompt API.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-duo-core/src/main/java/org/apereo/cas/adaptors/duo/authn/UniversalPromptDuoSecurityAuthenticationService.java