private String getCurrentPrincipal(final ProceedingJoinPoint joinPoint, final Audit audit, final Object retVal) {
        String currentPrincipal = null;
        var resolverName = audit.principalResolverName();
        if (!resolverName.trim().isEmpty()) {
            val resolver = auditPrincipalResolvers.get(resolverName);
            currentPrincipal = resolver.resolveFrom(joinPoint, retVal);
        }
        if (currentPrincipal == null) {
            currentPrincipal = defaultAuditPrincipalResolver.resolveFrom(joinPoint, retVal);
        }
        return currentPrincipal;
    }
Handle audit trail.

@param joinPoint the join point
@param audit     the audit
@return the object
@throws Throwable the throwable
core/cas-server-core-audit-api/src/main/java/org/apereo/inspektr/audit/AuditTrailManagementAspect.java