public static Optional<String> getBrowserStoragePayload(final RequestContext requestContext) throws Exception {
        if (requestContext.getRequestParameters().contains(BrowserStorage.PARAMETER_BROWSER_STORAGE)) {
            return Optional.of(requestContext.getRequestParameters().getRequired(BrowserStorage.PARAMETER_BROWSER_STORAGE))
                .stream()
                .filter(StringUtils::isNotBlank)
                .findFirst();
        }
        val httpServletRequest = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        return getBrowserStoragePayload(httpServletRequest);
    }
Read browser storage from request.

@param requestContext the request context
@return the optional
@throws Exception the exception
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java