@Override
    public String compact(final StringBuilder builder, final Ticket ticket) throws Exception {
        val refreshToken = (OAuth20RefreshToken) ticket;
        builder.append(String.format("%s%s", DELIMITER, refreshToken.getService().getShortenedId()));
        builder.append(String.format("%s%s", DELIMITER, refreshToken.getClientId()));
        builder.append(String.format("%s%s", DELIMITER, String.join("|", refreshToken.getScopes())));
        builder.append(String.format("%s%s", DELIMITER, refreshToken.getResponseType() != null ? refreshToken.getResponseType().ordinal() : OAuth20ResponseTypes.CODE.ordinal()));
        builder.append(String.format("%s%s", DELIMITER, refreshToken.getGrantType() != null ? refreshToken.getGrantType().ordinal() : OAuth20GrantTypes.AUTHORIZATION_CODE.ordinal()));
        builder.append(compactAuthenticationAttempt(refreshToken).toString());
        return builder.toString();
    }
This is {@link OAuth20RefreshTokenCompactor}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/ticket/refreshtoken/OAuth20RefreshTokenCompactor.java