Principal null in my very basic client implementation

13 views
Skip to first unread message

Sébastien Ragons

unread,
Dec 11, 2017, 6:00:34 PM12/11/17
to CAS Community
Hello,
I use this very easy/simple client to test my cas server:

After login through CAS my principal in null (request.getUserPrincipal())

Is it a problem with my cas configuration ?

My cas.properties joined

Thank you
Sebastien
cas.properties

Sébastien Ragons

unread,
Dec 11, 2017, 6:59:57 PM12/11/17
to CAS Community
I find the reason:
I didn't put CAS HttpServletRequest Wrapper Filter

I add this to my web.xml and i achieve to get a principal:

    <filter>
  <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
  <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>
<filter-mapping>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


My problem now is that there is no attributes in that principal 
Reply all
Reply to author
Forward
0 new messages