protected Service restoreDelegatedAuthenticationRequest ( final RequestContext requestContext , final WebContext webContext , final TransientSessionTicket ticket ) { val service = ticket . getService ( ) ; LOGGER . trace ( "Restoring requested service [{}] back in the authentication flow" , service ) ; WebUtils . putServiceIntoFlowScope ( requestContext , service ) ; webContext . setRequestAttribute ( CasProtocolConstants . PARAMETER_SERVICE , service ) ; val themeParamName = casProperties . getTheme ( ) . getParamName ( ) ; val localParamName = casProperties . getLocale ( ) . getParamName ( ) ; val properties = ticket . getProperties ( ) ; webContext . setRequestAttribute ( themeParamName , properties . get ( themeParamName ) ) ; webContext . setRequestAttribute ( localParamName , properties . get ( localParamName ) ) ; webContext . setRequestAttribute ( CasProtocolConstants . PARAMETER_METHOD , properties . get ( CasProtocolConstants . PARAMETER_METHOD ) ) ; return service ; }
Restore the information saved in the ticket and return the service .