Hi all,
I'm trying to get at the CAS username from within my client web application.
Authentication via CAS is working fine (ST is created and validated, then the
browser is redirected into the application). At this point in the application's
auth code I need to tell it what the username is. I don't have access to the
HttpServletRequest so HttpServletRequestWrapperFilter doesn't work here.
I found AssertionThreadLocalFilter and applied it (see web.xml attached). Then
in my application code I call "AssertionHolder.getAssertion()" but it always
returns null. Have I missed a step or am I going about this the wrong way
entirely?
Thanks,
Nick
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
<filter>
<filter-name>CAS Authentication Filter</filter-name>
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>https://login-test.denison.edu/cas/login</param-value>
</init-param>
<init-param>
<param-name>service</param-name>
<param-value>http://140.141.101.156/ibmcognos/cgi-bin/cognos.cgi?CAMNamespace=Denison-CAS</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.jasig.cas.client.validation.Cas10TicketValidationFilter</filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>https://login-test.denison.edu/cas</param-value>
</init-param>
<init-param>
<param-name>service</param-name>
<param-value>http://140.141.101.156/ibmcognos/cgi-bin/cognos.cgi?CAMNamespace=Denison-CAS</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>
<filter>
<filter-name>CAS Assertion Thread Local Filter</filter-name>
<filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CAS Authentication Filter</filter-name>
<url-pattern>/servlet/dispatch/ext/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/servlet/dispatch/ext/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
<url-pattern>/servlet/dispatch/ext/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Assertion Thread Local Filter</filter-name>
<url-pattern>/servlet/dispatch/ext/*</url-pattern>
</filter-mapping>