public Optional<String> getRequestParameter(final String key) {
        val result = getHttpServletRequest()
            .map(request -> request.getParameter(key))
            .filter(StringUtils::isNotBlank)
            .orElseGet(() -> getRequestContext().map(context -> context.getRequestParameters().get(key)).orElse(null));
        return Optional.ofNullable(result);
    }
Gets request parameter.

@param key the key
@return the request parameter
api/cas-server-core-api-webflow/src/main/java/org/apereo/cas/web/flow/SingleSignOnParticipationRequest.java