<commit_before><?php

use OpenConext\EngineBlock\Metadata\Entity\AbstractRole;
use OpenConext\EngineBlock\Metadata\Entity\IdentityProvider;
use OpenConext\EngineBlock\Metadata\Entity\ServiceProvider;
use OpenConext\EngineBlock\Validator\AllowedSchemeValidator;
use OpenConext\EngineBlockBundle\Exception\ResponseProcessingFailedException;
use SAML2\AuthnRequest;
use SAML2\Binding;
use SAML2\Certificate\KeyLoader;
use SAML2\Configuration\Destination;
use SAML2\Configuration\IdentityProvider as Saml2IdentityProvider;
use SAML2\Configuration\PrivateKey;
use SAML2\Configuration\ServiceProvider as Saml2ServiceProvider;
use SAML2\DOMDocumentFactory;
use SAML2\EncryptedAssertion;
use SAML2\Response\Exception\PreconditionNotMetException;
use SAML2\HTTPPost;
use SAML2\HTTPRedirect;
use SAML2\Message;
use SAML2\Response;
use SAML2\Signature\PublicKeyValidator;

/**
 * The bindings module for Corto, which implements support for various data
 * bindings.
 */
class EngineBlock_Corto_Module_Bindings extends EngineBlock_Corto_Module_Abstract
{
    const KEY_REQUEST  = 'SAMLRequest';
    const KEY_RESPONSE = 'SAMLResponse';

    protected static $ASSERTION_SEQUENCE = array(
        'saml:Issuer',
        'ds:Signature',
        'saml:Subject',
        'saml:Conditions',
        'saml:Advice',
        'saml:Statement',
        'saml:AuthnStatement',
        'saml:AuhzDecisionStatement',
        'saml:AttributeStatement',
    );

    /**
     * Supported bindings in Corto.
     * @var array
     */
    protected $_bindings = array(
        'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'        => '_sendHTTPRedirect',
        'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'            => '_sendHTTPPost',
        'INTERNAL'                                                  => 'sendInternal',
        'JSON-Redirect'                                             => '_sendHTTPRedirect',
        'JSON-POST'                                                 => '_sendHTTPPost',
        null                                                        => '_sendHTTPRedirect'
    );

    protected $allowedAcsSchemes = [
        'http',
        'https'
    ];

    /**
     * @var array
     */
    protected $_internalBindingMessages = array();

    /**
     * @var EngineBlock_Corto_ProxyServer
     */
    protected $_server;

    /**
     * @var OpenConext\EngineBlockBundle\Configuration\FeatureConfiguration
     */
    private $_featureConfiguration;

    /**
     * @var \Psr\Log\LoggerInterface
     */
    private $_logger;

    /**
     * @var Twig_Environment
     */
    private $twig;

    /**
     * @var AllowedSchemeValidator
     */
    private $acsLocationSchemeValidator;
<commit_msg>Clean up no longer used $allowedAcsSchemes<commit_after><?php

use OpenConext\EngineBlock\Metadata\Entity\AbstractRole;
use OpenConext\EngineBlock\Metadata\Entity\IdentityProvider;
use OpenConext\EngineBlock\Metadata\Entity\ServiceProvider;
use OpenConext\EngineBlock\Validator\AllowedSchemeValidator;
use OpenConext\EngineBlockBundle\Exception\ResponseProcessingFailedException;
use SAML2\AuthnRequest;
use SAML2\Binding;
use SAML2\Certificate\KeyLoader;
use SAML2\Configuration\Destination;
use SAML2\Configuration\IdentityProvider as Saml2IdentityProvider;
use SAML2\Configuration\PrivateKey;
use SAML2\Configuration\ServiceProvider as Saml2ServiceProvider;
use SAML2\DOMDocumentFactory;
use SAML2\EncryptedAssertion;
use SAML2\Response\Exception\PreconditionNotMetException;
use SAML2\HTTPPost;
use SAML2\HTTPRedirect;
use SAML2\Message;
use SAML2\Response;
use SAML2\Signature\PublicKeyValidator;

/**
 * The bindings module for Corto, which implements support for various data
 * bindings.
 */
class EngineBlock_Corto_Module_Bindings extends EngineBlock_Corto_Module_Abstract
{
    const KEY_REQUEST  = 'SAMLRequest';
    const KEY_RESPONSE = 'SAMLResponse';

    protected static $ASSERTION_SEQUENCE = array(
        'saml:Issuer',
        'ds:Signature',
        'saml:Subject',
        'saml:Conditions',
        'saml:Advice',
        'saml:Statement',
        'saml:AuthnStatement',
        'saml:AuhzDecisionStatement',
        'saml:AttributeStatement',
    );

    /**
     * Supported bindings in Corto.
     * @var array
     */
    protected $_bindings = array(
        'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'        => '_sendHTTPRedirect',
        'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'            => '_sendHTTPPost',
        'INTERNAL'                                                  => 'sendInternal',
        'JSON-Redirect'                                             => '_sendHTTPRedirect',
        'JSON-POST'                                                 => '_sendHTTPPost',
        null                                                        => '_sendHTTPRedirect'
    );

    /**
     * @var array
     */
    protected $_internalBindingMessages = array();

    /**
     * @var EngineBlock_Corto_ProxyServer
     */
    protected $_server;

    /**
     * @var OpenConext\EngineBlockBundle\Configuration\FeatureConfiguration
     */
    private $_featureConfiguration;

    /**
     * @var \Psr\Log\LoggerInterface
     */
    private $_logger;

    /**
     * @var Twig_Environment
     */
    private $twig;

    /**
     * @var AllowedSchemeValidator
     */
    private $acsLocationSchemeValidator;

{'fraction_non_alphanumeric': 0.0994402985074627, 'fraction_numerical': 0.007835820895522387, 'mean_word_length': 2.5503311258278147, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '404920', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1530, 'n_words': 261}