@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public RegisteredServiceResource registeredServiceResourceRestController(
        final CasConfigurationProperties casProperties,
        @Qualifier(WebApplicationService.BEAN_NAME_FACTORY)
        final ServiceFactory<WebApplicationService> webApplicationServiceFactory,
        @Qualifier(ServicesManager.BEAN_NAME)
        final ServicesManager servicesManager,
        @Qualifier(AuthenticationSystemSupport.BEAN_NAME)
        final AuthenticationSystemSupport authenticationSystemSupport) {
        val rest = casProperties.getRest().getServices();
        if (StringUtils.isBlank(rest.getAttributeName()) || StringUtils.isBlank(rest.getAttributeValue())) {
            throw new BeanCreationException(
                "No attribute name or value is defined to enforce authorization when adding services via CAS REST APIs. "
                + "This is likely due to misconfiguration in CAS settings where the attribute name/value definition is absent");
        }
        return new RegisteredServiceResource(authenticationSystemSupport, webApplicationServiceFactory,
            servicesManager, rest.getAttributeName(), rest.getAttributeValue());
    }
This is {@link CasRestServicesAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-rest-services/src/main/java/org/apereo/cas/config/CasRestServicesAutoConfiguration.java