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

        val idTokenContext = (IdTokenGenerationContext) auditableTarget.getArgs()[0];
        val accessToken = idTokenContext.getAccessToken();
        if (returnValue instanceof OidcIdToken(var token, var claims, var deviceSecret)) {
            if (claims.hasClaim(OidcConstants.TXN)) {
                val txn = FunctionUtils.doUnchecked(() -> claims.getStringClaimValue(OidcConstants.TXN));
                FunctionUtils.doIfNotNull(txn, __ -> values.put(OidcConstants.TXN, txn));
                values.put("authn_methods", accessToken.getAuthentication().getSuccesses().keySet());
            }
            values.put(OidcConstants.ID_TOKEN, DigestUtils.abbreviate(token, properties.getAbbreviationLength()));
        }
        val userProfile = idTokenContext.getUserProfile();
        values.put(OAuth20Constants.CLIENT_ID, accessToken.getClientId());
        if (!accessToken.getScopes().isEmpty()) {
            values.put(OAuth20Constants.SCOPE, accessToken.getScopes());
        }
        FunctionUtils.doIfNotNull(userProfile, __ -> values.put("username", userProfile.getId()));
        FunctionUtils.doIfNotNull(accessToken.getService(), svc -> values.put("service", svc));
        return new String[]{auditFormat.serialize(values)};
    }
This is {@link OidcIdTokenAuditResourceResolver}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/audit/OidcIdTokenAuditResourceResolver.java