class CrestAuditor {

    void auditAccessSuccess(JsonValue responseDetail) {
        if (auditEventPublisher.isAuditing(realm, ACCESS_TOPIC, EventName.AM_ACCESS_OUTCOME)) {

            final long endTime = currentTimeMillis();
            final long elapsedTime = endTime - startTime;
            AMAccessAuditEventBuilder builder = auditEventFactory.accessEvent(realm)
                    .forHttpRequest(context, request)
                    .timestamp(endTime, auditEventPublisher.isLtzEnabled())
                    .transactionId(AuditRequestContext.getTransactionIdValue())
                    .eventName(EventName.AM_ACCESS_OUTCOME)
                    .component(component);
            if (responseDetail == null) {
                builder.response(SUCCESSFUL, "", elapsedTime, MILLISECONDS);
            } else {
                builder.responseWithDetail(SUCCESSFUL, "", elapsedTime, MILLISECONDS, responseDetail);
            }
            addSessionDetailsFromSSOTokenContextIfNotNull(builder, context);

            if (ipAddressHeaderPropertyIsSet()) {
                setClientFromHttpContextHeaderIfExists(builder, context);
            }

            AuditEvent auditEvent = builder.toEvent();
            postProcessEvent(auditEvent);

            auditEventPublisher.tryPublish(ACCESS_TOPIC, auditEvent);
        }
    }

      CrestAuditor(Debug debug, AuditEventPublisher auditEventPublisher,
                 AuditEventFactory auditEventFactory, Context context, Request request);

}