Redirect to the last page requested after logging in using Jasig CAS

I am using Jasig CAS in a Spring application. The configuration of the CAS bean authentication filter is as follows:

<bean id="authenticationFilter" class="org.jasig.cas.client.authentication.AuthenticationFilter">
  <property name="casServerLoginUrl" value="https://localhost:8443/cas/login"/>
  <property name="service" value="https://localhost:8443/myapp/index.html"/>
</bean>  

those. on the one hand, the authentication filter will be redirected to the url specified in the property casServerLoginUrl, and on the other hand, the CAS server will redirect back to the url specified in the property service.

Is there a way to make a property of a property servicedynamic? I would like it to contain the last requested URL before logging in and, accordingly, redirect this URL after successful login using CAS.

+4
source share
2 answers

service ,

https://yourcas.com/cas/login?service=urlservice

CAS URL

+1

CAS-, . , CAS URL- .

URL- / "CasAuthenticationFilter", url, cas URL-. , 2. Cas-Server .

+1

Source: https://habr.com/ru/post/1625378/


All Articles