protected void buildAuditLogRecords(final RequestContext requestContext, final TicketGrantingTicket ticket) {
        val sinceDate = LocalDateTime.now(Clock.systemUTC()).minusMonths(2);
        val criteria = Map.<AuditTrailManager.WhereClauseFields, Object>of(
            AuditTrailManager.WhereClauseFields.DATE, sinceDate,
            AuditTrailManager.WhereClauseFields.PRINCIPAL, ticket.getAuthentication().getPrincipal().getId());
        val auditLog = auditTrailManager.getAuditRecords(criteria)
            .stream()
            .sorted(Comparator.comparing(AuditActionContext::getWhenActionWasPerformed).reversed())
            .map(Unchecked.function(entry -> new AccountAuditActionContext(entry, MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(entry))))
            .collect(Collectors.toList());
        FunctionUtils.doIf(!auditLog.isEmpty(), u -> requestContext.getFlowScope().put("auditLog", auditLog)).accept(auditLog);
    }
Prepare the authenticated account for view.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-actions-core/src/main/java/org/apereo/cas/web/flow/account/PrepareAccountProfileViewAction.java