I've got an application that has one field for "Full Name" but our
environment only releases GivenName and Surname. I thought it would be
trivial to use something like mod_headers or mod_rewrite to concatenate
these two fields together, but it's proving more of a challenge than I
expected.
I used a PHP script in my application's directory to verify that the
variables were set by calling print_r($_SERVER); and get, among others, the
following variables displayed:
[HTTP_CAS_SURNAME] => Keifer
[HTTP_CAS_GIVENNAME] => Brian
If I try to combine these using:
RequestHeader set MyHeader "%{HTTP_CAS_GIVENNAME}e %{HTTP_CAS_SURNAME}e"
I end up with this:
[HTTP_MYHEADER] => (null) (null)
I've tried this using mod_rewrite as well. I used REMOTE_ADDR just to
prove to myself that I could at least access *some* variables.
RewriteRule .* - [E=GIVENNAME:%{LA-U:REMOTE_ADDR}]
RewriteRule .* - [E=SURNAME:%{LA-U:HTTP_CAS_SURNAME}]
produces this:
[SURNAME] =>
[GIVENNAME] => 10.2.12.142
Interestingly, using mod_headers in a similar fashion with one CAS variable
and REMOTE_ADDR behaves differently. This:
RequestHeader set GIVENNAME1 "%{HTTP_CAS_GIVENNAME}e"
RequestHeader set SURNAME1 "%{REMOTE_ADDR}e"
Produces:
[HTTP_SURNAME1] => (null)
[HTTP_GIVENNAME1] => (null)
Can anyone shed some light on this? Why can't I get at these variables?
Thanks,
-Brian
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/1483014e-e004-4c68-bf22-46ec44fa9070n%40apereo.org.