Hi,

deanhe01 wrote:
> 
> As Scott said, if you have Spring Security configured correctly  then the
> UserPrincipal should be in your HttpServletRequest and your code to
> retrieve the proxy ticket becomes something like the following:
> 
>     CasAuthenticationToken token = request.getUserPrincipal();
> 
>     token.getAssertion().getPrincipal().getProxyTicketFor(<service name>); 
> where <service name> is the name of the service you want to proxy.
> 

Thanks to both of you, I solved the issue right after Scott sent his answer.
I had all the pieces there and had been playing with those relevant classes
for some time, but due to a rather stupid bug in my own code I couldn't get
access to the Assertion object even though I thought I should be able to
retrieve it. But thanks a lot for opening my eyes, now the system is working
fine.

It would be great if the people behind CAS could update the CAS wiki
documentation to include more comprehensive examples and tutorials of how to
use CAS on different platforms. There are lots of bits and pieces here and
there, but it would help a lot if the documentation could be unified. At
least for me a comprehensive and clear example of Spring-based app using CAS
with proxy support would have helped a lot. At the moment the CAS wiki
appears to be a bit messy, containing partly outdated information, so IMHO
some kind of documentation effort would be needed to make the CAS usage and
integration more convenient. I might be able to contribute with the
mentioned "CAS with proxy support on Spring" example app or tutorial in the
near future, but while I'm not a CAS nor JEE guru, I can't do much more. 

And an easy way to make the documentation more useful: when writing some
tutorials etc, telling explicitly the software versions the document applies
to would help a lot, saving us beginners from thinking if this particular
document is directly useful or not. 

-- 
View this message in context: 
http://www.nabble.com/CAS-%2B-Spring%3A-how-to-obtain-and-use-proxy-%28granting%29-tickets--tp24719822p24787870.html
Sent from the CAS Users mailing list archive at Nabble.com.


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

Reply via email to