>From just the regular Jasig CAS Client, if you've enabled the wrapping filter, just do:
final AttributePrincipal attributePrincipal = (AttributePrincipal) request.getPrincipal(): attributePrincipal.getPRoxyTicketFor(url) Cheers, Scott On Fri, Jan 29, 2010 at 5:14 PM, Leena Borle <[email protected]> wrote: > Hi, > If you are using cas3 with spring security, > > import org.springframework.security.context.SecurityContextHolder; > import org.springframework.security.context.SecurityContext; > import org.springframework.security.providers.cas.CasAuthenticationToken; > import org.jasig.cas.client.validation.Assertion; > > public static String getProxyTicketForService(String url) { > String proxyTicket = null; > SecurityContext ctx = SecurityContextHolder.getContext(); > if (ctx.getAuthentication() != null) { > CasAuthenticationToken auth = (CasAuthenticationToken) > ctx.getAuthentication(); > Assertion assertion = auth.getAssertion(); > proxyTicket = assertion.getPrincipal().getProxyTicketFor(url); > } > return proxyTicket; > } > > Is this what you are looking for ? > Leena > On Fri, Jan 29, 2010 at 8:29 AM, Alex Barker <[email protected]>wrote: > >> Does anyone have or know where I can find java code illustrating how to >> obtain a proxy granting ticket (pgt) for CAS3? All the information on >> the subject appears to target the yale release using classes that no >> longer exist. >> >> Thanks >> >> -- >> >> Alexander Barker >> Senior Programmer >> California Lutheran University >> Information Systems and Services >> 60 West Olsen Road >> Thousand Oaks, CA 91360 >> 805.493.3912 >> >> >> -- >> 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 >> > > -- > 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 > > -- 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
