protected boolean shouldSkipRequiredServiceCheck(final RequestContext context,
                                                   final Pattern initialServicePattern) {
        val service = WebUtils.getService(context);
        if (service == null) {
            return false;
        }
        val matches = RegexUtils.find(initialServicePattern, service.getId());
        if (matches) {
            return true;
        }

        val registeredService = servicesManager.findServiceBy(service);
        return RegisteredServiceProperties.SKIP_REQUIRED_SERVICE_CHECK.isAssignedTo(registeredService);
    }
Configure webflow for initial mandatory service.

@param context                the context
@param ticketGrantingTicketId the ticket granting ticket id
@param initialServicePattern  the initial service pattern
support/cas-server-support-actions-core/src/main/java/org/apereo/cas/web/flow/login/VerifyRequiredServiceAction.java