protected String tranactionToResourceString(final AuthenticationTransaction transaction) {
        val payload = CollectionUtils.wrap("credential", transaction.getCredentials());
        if (transaction instanceof final RegisteredServiceAwareAuthenticationTransaction rsat) {
            FunctionUtils.doIfNotNull(rsat.getRegisteredService(), registeredService -> {
                payload.put("registeredServiceUrl", registeredService.getServiceId());
                payload.put("registeredServiceId", registeredService.getId());
                payload.put("registeredServiceFriendlyName", registeredService.getFriendlyName());
                payload.put("registeredServiceName", registeredService.getName());
                payload.put("service", getServiceId(transaction.getService()));
            });
        }
        val auditFormat = AuditFormats.valueOf(properties.getAuditFormat().name());
        return auditFormat.serialize(payload);
    }
Converts the Credential object into a String resource identifier.

@author Scott Battaglia
@since 3.1.2
core/cas-server-core-audit-api/src/main/java/org/apereo/cas/audit/spi/resource/CredentialsAsFirstParameterResourceResolver.java