0

I want to add one page to jasig cas-server.

after successfull login, it displays casGenericSuccess.jsp, In this page I have added a link called "User Management".

Now, I want if user clicks on that it should open "userManagement.jsp" page and I am able to open but that page I want to keep secure that without authentication it should redirect to login page.

Till Now what i did is,

web.xml

  <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/mobileapp/*</url-pattern>
  </filter-mapping>

 <servlet>
    <servlet-name>cas</servlet-name>
    <servlet-class>
      org.jasig.cas.web.init.SafeDispatcherServlet
    </servlet-class>
    <init-param>
      <param-name>publishContext</param-name>
      <param-value>false</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>cas</servlet-name>
    <url-pattern>/mobileapp/*</url-pattern>
  </servlet-mapping>

securityContext.xml

cas-servlet.xml

<prop key="/mobileapp/*">userManagementMultiActionController</prop>

  <bean id="userManagementMultiActionController"
        class="org.jasig.cas.web.UserManagementMultiActionController">
  </bean>

It is going to UserManagementMultiActionController, and getting the page but only problem what I am facing is the page is still not secure.

can someone please guide me the right way to add new jsp page in cas server.

Jayesh
  • 6,047
  • 13
  • 49
  • 81

2 Answers2

0

You also need to define in securityContext.xml that you want the url to be protected...

jleleu
  • 2,309
  • 1
  • 13
  • 9
0

It looks good. What's your property cas.securityContext.serviceProperties.service.onmobile value ? When looping, do you have service tickets parameter added to the CAS service url ?

jleleu
  • 2,309
  • 1
  • 13
  • 9