CASAuthNHeader to return user

580 views
Skip to first unread message

pouria Mahmoudi

unread,
Nov 21, 2016, 4:13:02 PM11/21/16
to CAS Community
Hi Everyone,
In the documentation, there is a part said:

Directive: CASAuthNHeader
Default: None
Description: If enabled, this will store the user returned by CAS in an HTTP header
accessible to your web applications.


And this is the CAS configuration:

LoadModule auth_cas_module /usr/lib64/apache2/mod_auth_cas.so
CASSSOEnabled On
CASCookiePath /var/cache/apache2/mod_auth_cas/
CASDebug on
LogLevel debug

<Location / >
        Authtype CAS
        CASAuthNHeader cas_user
        require valid-user
</Location>


but it doesn't look like I have an http header. At least by doing Inspect Element on my browser I cannot see it.

Any help would be appreciated.

David Hawes

unread,
Nov 21, 2016, 4:41:30 PM11/21/16
to CAS Community
On 21 November 2016 at 16:13, pouria Mahmoudi <pouria....@gmail.com> wrote:
...
> Description: If enabled, this will store the user returned by CAS in an HTTP
> header
> accessible to your web applications.
...
> but it doesn't look like I have an http header. At least by doing Inspect
> Element on my browser I cannot see it.
>
> Any help would be appreciated.

These headers are not sent to your browser, so you will not see it
there. They are only set on the server.

pouria Mahmoudi

unread,
Nov 21, 2016, 6:03:11 PM11/21/16
to CAS Community
Excellent. Thanks That was it.

Neil Sabol

unread,
Nov 21, 2016, 6:08:53 PM11/21/16
to cas-...@apereo.org
Hello Pouria, All,

To build on David's response, you should be able to echo out the HTTP Headers on the server side with whatever language you are using.

For example, in PHP see http://php.net/manual/en/function.getallheaders.php (Example #1) - just create a test page in your DocumentRoot, place that code in it, and navigate to its URL in your browser.

You could also use phpinfo() in PHP. Similar functionality is available in other languages (Java, etc.) as well.

Hope that helps.

Thank you,
-Neil
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAAgu-wD%3D%2BShy_gPkRfz3UnJcLEfhjNYFMg-B3w8VUZjAGP-9ag%40mail.gmail.com.

pouria Mahmoudi

unread,
Nov 22, 2016, 4:45:21 PM11/22/16
to CAS Community, nss...@unm.edu
Thanks Neil
Reply all
Reply to author
Forward
0 new messages