protected TransientSessionTicket retrieveSessionTicketViaClientId ( final WebContext webContext , final String clientId ) { val ticket = this . ticketRegistry . getTicket ( clientId , TransientSessionTicket . class ) ; if ( ticket == null ) { LOGGER . error ( "Delegated client identifier cannot be located in the authentication request [{}]" , webContext . getFullRequestURL ( ) ) ; throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_UNAUTHZ_SERVICE , StringUtils . EMPTY ) ; } if ( ticket . isExpired ( ) ) { LOGGER . error ( "Delegated client identifier [{}] has expired in the authentication request" , ticket . getId ( ) ) ; this . ticketRegistry . deleteTicket ( ticket . getId ( ) ) ; throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_UNAUTHZ_SERVICE , StringUtils . EMPTY ) ; } LOGGER . debug ( "Located delegated client identifier as [{}]" , ticket . getId ( ) ) ; return ticket ; }
Retrieve session ticket via client id .