protected Credential getServiceCredentialsFromRequest(final WebApplicationService service, final HttpServletRequest request) {
        val pgtUrl = request.getParameter(CasProtocolConstants.PARAMETER_PROXY_CALLBACK_URL);
        if (StringUtils.isNotBlank(pgtUrl)) {
            try {
                val registeredService = serviceValidateConfigurationContext.getServicesManager()
                    .findServiceBy(service, CasModelRegisteredService.class);
                verifyRegisteredServiceProperties(registeredService, service);
                val credential = new HttpBasedServiceCredential(new URI(pgtUrl).toURL(), registeredService);
                val serviceTicket = serviceValidateConfigurationContext.getTicketRegistry().getTicket(service.getArtifactId(), ServiceTicket.class);
                val httpCredential = new BasicIdentifiableCredential(serviceTicket.getAuthentication().getPrincipal().getId());
                credential.setCredentialMetadata(new BasicCredentialMetadata(httpCredential));
                return credential;
            } catch (final Exception e) {
                LOGGER.error("Error constructing [{}]", CasProtocolConstants.PARAMETER_PROXY_CALLBACK_URL);
                LoggingUtils.error(LOGGER, e);
            }
        }
        return null;
    }
Add validation specification.

@param validationSpecification the validation specification
support/cas-server-support-validation-core/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java