@Override
    public String[] resolveFrom(final JoinPoint joinPoint, final Object returnValue) {
        val results = new HashMap<String, Object>();

        val args = AopUtils.unWrapJoinPoint(joinPoint).getArgs();
        if (args != null && args.length > 0) {
            val ticketId = args[0].toString();
            results.put("ticket", ticketId);
        }

        if (returnValue instanceof final Assertion assertion) {
            val authn = assertion.getPrimaryAuthentication();
            results.put("principal", authn.getPrincipal().getId());
            val attributes = new HashMap<String, Object>(authn.getAttributes());
            attributes.putAll(authn.getPrincipal().getAttributes());
            results.put("attributes", attributes);
        }

        val auditFormat = AuditTrailManager.AuditFormats.valueOf(properties.getAuditFormat().name());
        return results.isEmpty()
            ? ArrayUtils.EMPTY_STRING_ARRAY
            : new String[]{auditFormat.serialize(finalizeResources(results, joinPoint, returnValue))};
    }
Implementation of the ResourceResolver that can determine the Ticket Id from
the first parameter of the method call as well as the returned value, typically assertion.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-audit-api/src/main/java/org/apereo/cas/audit/spi/resource/TicketValidationResourceResolver.java