<commit_before>package org.apereo.cas.support.saml.web;

import org.apereo.cas.CasViewConstants;
import org.apereo.cas.audit.AuditableContext;
import org.apereo.cas.audit.AuditableExecution;
import org.apereo.cas.authentication.AuthenticationSystemSupport;
import org.apereo.cas.authentication.DefaultAuthenticationBuilder;
import org.apereo.cas.authentication.credential.UsernamePasswordCredential;
import org.apereo.cas.authentication.principal.PrincipalFactory;
import org.apereo.cas.authentication.principal.ServiceFactory;
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.support.saml.OpenSamlConfigBean;
import org.apereo.cas.support.saml.SamlUtils;
import org.apereo.cas.support.saml.authentication.SamlResponseBuilder;
import org.apereo.cas.web.BaseCasActuatorEndpoint;

import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * This is {@link SamlValidateEndpoint}.
 *
 * @author <NAME>
 * @since 6.1.0
 */
@Endpoint(id = "samlValidate", enableByDefault = false)
@Slf4j
public class SamlValidateEndpoint extends BaseCasActuatorEndpoint {
    private final ServicesManager servicesManager;
    private final AuthenticationSystemSupport authenticationSystemSupport;
    private final ServiceFactory<WebApplicationService> serviceFactory;
    private final PrincipalFactory principalFactory;
    private final SamlResponseBuilder samlResponseBuilder;
    private final OpenSamlConfigBean openSamlConfigBean;
    private final AuditableExecution registeredServiceAccessStrategyEnforcer;
    
    public SamlValidateEndpoint(final CasConfigurationProperties casProperties,
                                final ServicesManager servicesManager,
                                final AuthenticationSystemSupport authenticationSystemSupport,
                                final ServiceFactory<WebApplicationService> serviceFactory,
                                final PrincipalFactory principalFactory,
                                final SamlResponseBuilder samlResponseBuilder,
                                final OpenSamlConfigBean openSamlConfigBean,
                                final AuditableExecution registeredServiceAccessStrategyEnforcer) {
        super(casProperties);
        this.servicesManager = servicesManager;
        this.authenticationSystemSupport = authenticationSystemSupport;
        this.serviceFactory = serviceFactory;<commit_msg>Updated: code cleanup and styling; fixes test cases<commit_after>package org.apereo.cas.support.saml.web;

import org.apereo.cas.CasViewConstants;
import org.apereo.cas.audit.AuditableContext;
import org.apereo.cas.audit.AuditableExecution;
import org.apereo.cas.authentication.AuthenticationSystemSupport;
import org.apereo.cas.authentication.DefaultAuthenticationBuilder;
import org.apereo.cas.authentication.credential.UsernamePasswordCredential;
import org.apereo.cas.authentication.principal.PrincipalFactory;
import org.apereo.cas.authentication.principal.ServiceFactory;
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.support.saml.OpenSamlConfigBean;
import org.apereo.cas.support.saml.SamlUtils;
import org.apereo.cas.support.saml.authentication.SamlResponseBuilder;
import org.apereo.cas.web.BaseCasActuatorEndpoint;

import lombok.val;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * This is {@link SamlValidateEndpoint}.
 *
 * @author <NAME>
 * @since 6.1.0
 */
@Endpoint(id = "samlValidate", enableByDefault = false)
public class SamlValidateEndpoint extends BaseCasActuatorEndpoint {
    private final ServicesManager servicesManager;

    private final AuthenticationSystemSupport authenticationSystemSupport;

    private final ServiceFactory<WebApplicationService> serviceFactory;

    private final PrincipalFactory principalFactory;

    private final SamlResponseBuilder samlResponseBuilder;

    private final OpenSamlConfigBean openSamlConfigBean;

    private final AuditableExecution registeredServiceAccessStrategyEnforcer;

    public SamlValidateEndpoint(final CasConfigurationProperties casProperties,
                                final ServicesManager servicesManager,
                                final AuthenticationSystemSupport authenticationSystemSupport,
                                final ServiceFactory<WebApplicationService> serviceFactory,
                                final PrincipalFactory principalFactory,
                                final SamlResponseBuilder samlResponseBuilder,
                                final OpenSamlConfigBean openSamlConfigBean,
                                final AuditableExecution registeredServiceAccessStrategyEnforcer) {
        super(casProperties);
        this.servicesManager = servicesManager;
        this.authenticationSystemSupport = authenticationSystemSupport;
        this.serviceFactory = serviceFactory;
{'fraction_non_alphanumeric': 0.06505405900678028, 'fraction_numerical': 0.0016492578339747114, 'mean_word_length': 4.0724907063197024, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6726108', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1326, 'n_words': 247}