Hello,

I need to extend my overlay of CAS 5.3.3, to support an additional endpoint.

MyController looks like this.  User login to CAS already. I want to get the 
authenticated user Id when user comes to this endpoint.

But, I am unable to get TGT below.  What would be the right approach?

Thx!
Yan

@Autowired
CookieRetrievingCookieGenerator ticketGrantingTicketCookieGenerator;
        @Autowired
        private TicketRegistry ticketRegistry;

@RequestMapping(value = "/xyz", method = RequestMethod.GET)
public ModelAndView doSomething(HttpServletRequest httpRequest) {

TicketGrantingTicket ticket = 
CookieUtils.getTicketGrantingTicketFromRequest(ticketGrantingTicketCookieGenerator,
 
ticketRegistry, httpRequest); 
Principal principal = ticket.getAuthentication().getPrincipal();

         }

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/4d82476a-7831-4b42-abe8-49837bd22456%40apereo.org.

Reply via email to