protected String getRequestedService ( final HttpServletRequest request ) { val targetService = request . getParameter ( CasProtocolConstants . PARAMETER_TARGET_SERVICE ) ; val service = request . getParameter ( CasProtocolConstants . PARAMETER_SERVICE ) ; val serviceAttribute = request . getAttribute ( CasProtocolConstants . PARAMETER_SERVICE ) ; if ( StringUtils . isNotBlank ( targetService ) ) { return targetService ; } if ( StringUtils . isNotBlank ( service ) ) { return service ; } if ( serviceAttribute != null ) { if ( serviceAttribute instanceof Service ) { return ( ( Service ) serviceAttribute ) . getId ( ) ; } return serviceAttribute . toString ( ) ; } return null ; }
Gets requested service .