public static void putWarnCookieIfRequestParameterPresent ( final CasCookieBuilder warnCookieGenerator , final RequestContext context ) { if ( warnCookieGenerator != null ) { LOGGER . trace ( "Evaluating request to determine if warning cookie should be generated" ) ; val response = WebUtils . getHttpServletResponseFromExternalWebflowContext ( context ) ; if ( StringUtils . isNotBlank ( context . getExternalContext ( ) . getRequestParameterMap ( ) . get ( "warn" ) ) ) { warnCookieGenerator . addCookie ( response , "true" ) ; } } else { LOGGER . trace ( "No warning cookie generator is defined" ) ; } }
Put warn cookie if request parameter present .