default void collectSurrogateAttributes(final AuthenticationBuilder builder,
                                            final String surrogateUser,
                                            final String principal) {
        LOGGER.debug("Recording surrogate username [{}] as an authentication attribute", surrogateUser);
        builder.addAttribute(SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_USER, surrogateUser);
        builder.addAttribute(SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_PRINCIPAL, principal);
        builder.addAttribute(SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_ENABLED, Boolean.TRUE);
    }
Collect surrogate attributes.

@param builder       the builder
@param surrogateUser the surrogate user
@param principal     the principal
support/cas-server-support-surrogate-api/src/main/java/org/apereo/cas/authentication/surrogate/SurrogateAuthenticationService.java