public static Principal getPrincipalFromRequestContext ( final RequestContext requestContext , final TicketRegistrySupport ticketRegistrySupport ) { val tgt = WebUtils . getTicketGrantingTicketId ( requestContext ) ; if ( StringUtils . isBlank ( tgt ) ) { throw new IllegalArgumentException ( "No ticket-granting ticket could be found in the context" ) ; } return ticketRegistrySupport . getAuthenticatedPrincipalFrom ( tgt ) ; }
Gets the authenticated principal .