I'm not sure that you are going to be able to achieve this with any easy method:

1) The browser does have to go to the cas server to login.  So the url will 
start with the location of the CAS server webapp whereever it is.  In your 
case, it is http://localhost:8888/cas-server-webapp-3.3.5.  You can rename that 
webapp to anything you want, so you could deply it as "myapplication-login" or 
something like that.  Unless you plan to create a proxy in front of CAS, the 
browser is going to show the CAS URI.

2) The "service=" query parameter is used by CAS to know where to send you back 
after authentication.  I suppose you could write something in the CAS server to 
take that, stash it in the session and forward the user to a more generic uri, 
but for what purpose?

David Ohsie
Software Architect
EMC Corporation

-----Original Message-----
From: Rohit Kotecha [mailto:[email protected]] 
Sent: Thursday, April 11, 2013 9:57 AM
To: [email protected]
Cc: [email protected]
Subject: RE: re:[cas-user] CAS 3.3.5-how to rewrite CAS login URL

HI,

Thanks for quick reply.

I don’t want to control post authentication url. I want to control the url when 
CAS's login page is displayed to user. 
>From my spring web application when user click on any secure link, it will 
>redirected to CAS's login page. That is ok.

But URL in the browser at the same time is : : 
http://localhost:8888/cas-server-webapp-3.3.5/login?service 
=http://localhost:8888/myapplication/J_spring_cassecurity_check.

I want to control/rewrite above url which is visible by user. I want to display 
url something like: http://localhost:8888/myapplication/login and not above url 
which spring/CAS generate internally.

Thanks and Regards,
Rohit kotecha

-----Original Message-----
From: jleleu [mailto:[email protected]]
Sent: Thursday, April 11, 2013 6:56 PM
To: [email protected]
Subject: re:[cas-user] CAS 3.3.5-how to rewrite CAS login URL

Hi,

Spring Security CAS client uses a single service url when redirecting to 
/cas/login url. It works that way as the original protected url is always saved 
before redirection to be restored after authentication.

If you want to control the url post authentication, you need to do that on 
application side, something like :
<bean id="casFilter" class="org.springframework.security.cas.web.CasAut 
henticationFilter">  <property name="authenticationManager" 
ref="authenticationManager"/>  <property name="authenticationSuccessHandler">
  <bean 
class="org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler"
 
   p:alwaysUseDefaultTargetUrl="true"
   p:defaultTargetUrl="http://localhost:8888/myapplication/login"; />  
</property> </bean>

Best regards,
Jérôme

--
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

-**************Nihilent***************
" *** All information contained in this communication is confidential, 
proprietary, privileged and is intended for the addressees only. If youhave 
received this E-mail in error please notify mail administrator by telephone on 
+91-20-39846100 or E-mail the sender by replying to this message, and then 
delete this E-mail and other copies of it from your computer system.
Any unauthorized dissemination,publication, transfer or use of the contents of 
this communication, with or without modifications is punishable under the 
relevant law.

Nihilent has scanned this mail with current virus checking technologies. 
However, Nihilent makes no representations or warranties to the effect that 
this communication is virus-free.

Nihilent reserves the right to monitor all E-mail communications through its 
Corporate Network. *** "

*************************************************************************-
--
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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to