public Optional<String> getRequestParameterOrAttribute(final HttpServletRequest request, final String name) {
        return Optional.ofNullable(request.getParameter(name))
            .or(() -> Optional.ofNullable((String) request.getAttribute(name)))
            .filter(StringUtils::isNotBlank);
    }
Gets request parameter or attribute.

@param request the request
@param name    the name
@return the request parameter or attribute
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java