private boolean isIdentityRemoved(WebSubjectContext subjectContext) {
        ServletRequest request = subjectContext.resolveServletRequest();
        if (request != null) {
            Boolean removed = (Boolean) request.getAttribute(ShiroHttpServletRequest.IDENTITY_REMOVED_KEY);
            return removed != null && removed;
        }
        return false;
    }
Base64-encodes the specified serialized byte array and sets that base64-encoded String as the cookie value.
<p/>
The {@code subject} instance is expected to be a {@link WebSubject} instance with an HTTP Request/Response pair
so an HTTP cookie can be set on the outgoing response.  If it is not a {@code WebSubject} or that
{@code WebSubject} does not have an HTTP Request/Response pair, this implementation does nothing.

@param subject    the Subject for which the identity is being serialized.
@param serialized the serialized bytes to be persisted.
web/src/main/java/org/apache/shiro/web/mgt/CookieRememberMeManager.java