By: Zach Tubb user 21 Sep 2017 at 3:07 p.m. CDT

1 Response
Zach Tubb gravatar
Hi folks, We are doing some custom logic on an Apache server that adds some custom headers in the request before heading to a SP and then bouncing back to Gluu for IdP. I'm trying to access those headers but am having a hard time. I pulled some snippets from the provided 'cert' script and implemented them in the 'basic' script. ``` def prepareForStep(self, configurationAttributes, requestParameters, step): facesContext = CdiUtil.bean(FacesContext) externalContext = facesContext.getExternalContext() request = externalContext.getRequest() if (step == 1): print "Basic. Prepare for Step 1++++++++++++++" print "Custom apache header: %s" % (externalContext.getRequestHeaderMap().get("apache_name")) return True else: return False ``` I'm always getting 'none' for that header though. I suspect I'm not getting the context correctly or something. Do you have any tips or suggestions? I'm seeing my additions to the 'basic' script output into the log and all the print statements as well.

By Zach Tubb user 21 Sep 2017 at 3:40 p.m. CDT

Zach Tubb gravatar
Loose nut behind the keyboard. Forgot to allow my header plugin that was attaching custom headers to run in Incognito mode.