@Bean
        @ConditionalOnMissingBean(name = "jsonUserDetailsService")
        public UserDetailsService userDetailsService(final CasConfigurationProperties casProperties) throws Exception {
            val resource = casProperties.getMonitor().getEndpoints().getJson().getLocation();
            try (val in = resource.getInputStream()) {
                val listOfUsers = MAPPER.readValue(in, new TypeReference<List<CasUserDetails>>() {
                });
                val userDetails = listOfUsers
                    .stream()
                    .map(user -> {
                        val authorities = user.getAuthorities()
                            .stream()
                            .map(authority -> StringUtils.prependIfMissing(authority, "ROLE_"))
                            .map(SimpleGrantedAuthority::new)
                            .toList();
                        var password = user.getPassword();
                        if (!PATTERN_PASSWORD_ALG.matcher(password).matches()) {
                            password = "{noop}" + password;
                        }
                        return User.builder()
                            .username(user.getUsername())
                            .password(password)
                            .authorities(authorities)
                            .build();
                    })
                    .toList();
                return new InMemoryUserDetailsManager(userDetails);
            }
        }
This is {@link CasWebSecurityConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-webconfig/src/main/java/org/apereo/cas/config/CasWebSecurityConfiguration.java