As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
// Store the original URL httpSess.setAttribute(LoginBean.LOGIN_REDIRECT_KEY, ??????);
String userName = null; Object o = httpSess.getAttribute(CASFilter.CAS_FILTER_USER); if (o == null) { logger.error("CAS : CASFilter.CAS_FILTER_USER == NULL"); } else { userName = o.toString(); }
<filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/wcs/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/wcs/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/service/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/service/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/navigate/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/navigate/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/command/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/command/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/template/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/template/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/download/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/download/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/d/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/d/*</url-pattern> </filter-mapping>
<filter> <filter-name>Authentication Filter</filter-name> <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class> <init-param> <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name> <param-value>https://stage2:443/cas/login</param-value> </init-param> <init-param> <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name> <param-value>https://stage2:443/cas/serviceValidate</param-value> </init-param> <init-param> <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name> <param-value>stage2:80</param-value> </init-param> </filter> <filter> <filter-name>CAS Authentication</filter-name> <filter-class>com.bluexml.common.cas.CasAuthenticationFilter</filter-class> </filter>
<filter-mapping> <filter-name>Authentication Filter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CAS Authentication</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping>
// If we need to redirect to a specific page String redirectionUrl = (String) req.getSession().getAttribute(LoginBean.LOGIN_REDIRECT_KEY); if (redirectionUrl != null && redirectionUrl.length() > 0) { resp.sendRedirect(redirectionUrl); } else { // Redirect the login page as it is never seen as we always login by name