@Override
    public Service resolveServiceFrom(final Service service) {
        val entityId = getEntityIdAsParameter(service).orElseThrow().getValue();
        LOGGER.trace("Located entity id [{}] from service authentication request at [{}]", entityId, service.getId());
        return createService(entityId, service);
    }
This is {@link SamlIdPEntityIdAuthenticationServiceSelectionStrategy}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/SamlIdPEntityIdAuthenticationServiceSelectionStrategy.java