protected Map<String, String> initialize(final Map<String, Object> attributes) {
        val cachedAttributesToEncode = new HashMap<String, String>();
        removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL);
        removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET);
        removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU);
        return cachedAttributesToEncode;
    }
Initialize the encoding process. Removes the
{@link CasViewConstants#MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL}
and
{@link CasViewConstants#MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET}
from the authentication attributes originally and into a cache object, so it
can later on be encrypted if needed.

@param attributes the new encoded attributes
@return a map of attributes that are to be encoded and encrypted
core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/support/AbstractProtocolAttributeEncoder.java