Using proxy tickets
We can now use our PGT to create a PT to authenticate it to a service. The code to do this is quite trivially demonstrated in the EchoController
class that we have included in the code for this chapter. You can see the relevant portions of it in the following code snippet. For additional details, refer to the example source code:
//src/main/java/com/packtpub/springsecurity/web/controllers/ EchoController.java @GetMapping("/echo") public String echo() { final CasAuthenticationToken token = (CasAuthenticationToken) SecurityContextHolder .getContext() .getAuthentication(); // The proxyTicket could be cached in session and reused if we wanted to &...