This is main class of web intergation package.
This filter could be used in pure Servlet 2.5 environment and via Spring Framework. You need to position this filter before any authentication check in your application.
Retrieved UserInfo instance is stored in session attribute
ServletAuthenticationService.KSHIELD_PRINCIPAL_TOKEN
after successful validation.
You can use this data for furher validation or other authenticanion steps required in your application.
Example configuration in web.xml:
<filter>
<filter-name>KShieldAuthFilter</filter-name>
<filter-class>cz.tdp.kshield.integration.web.KShieldAuthenticationFilter</filter-class>
<init-param>
<param-name>serviceClass</param-name>
<param-value>cz.tdp.kshield.integration.DefaultAuthenticationServiceImpl</param-value>
</init-param>
<init-param>
<param-name>serverUrl</param-name>
<param-value>http://127.0.0.1:8485</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>KShieldAuthFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>