<commit_before><?php
/**
 * SURFconext EngineBlock
 *
 * LICENSE
 *
 * Copyright 2011 SURFnet bv, The Netherlands
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 *
 * @category  SURFconext EngineBlock
 * @package
 * @copyright Copyright © 2010-2011 SURFnet SURFnet bv, The Netherlands (http://www.surfnet.nl)
 * @license   http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 */

/**
 * Called by Corto *after consent*, just as it prepares to send the response to the SP
 */
class EngineBlock_Corto_Filter_Output extends EngineBlock_Corto_Filter_Abstract
{
    /**
     * These commands will be evaluated in order.
     *
     * A command can throw an exception and halt SSO,
     * it can manipulate the response or it's attributes or it can communicate with external systems.
     * One thing it can't do is communicate with the user.
     *
     * @return array
     */
    protected function _getCommands()
    {
        return array(
            // If EngineBlock is in Processing mode (redirecting to it's self)
            // Then don't continue with the rest of the modifications
            new EngineBlock_Corto_Filter_Command_RejectProcessingMode(),

            // Check if the request was for a VO, if it was, validate that the user is a member of that vo
            new EngineBlock_Corto_Filter_Command_ValidateVoMembership(),

            // Add collabPersonId attribute
            new EngineBlock_Corto_Filter_Command_AddCollabPersonIdAttribute(),

            // Validate the license for this user / Service Provider
            new EngineBlock_Corto_Filter_Command_ValidateLicense(),

            // Aggregate attributes from other sources (only VOManage for now)
            new EngineBlock_Corto_Filter_Command_AggregateAttributes(),

            // If the SP requires knowledge of the VO memberships, add it to the isMemberOf attribute.
            new EngineBlock_Corto_Filter_Command_AddVoMemberships(),

            // Apply ARP before we add the OID variants
            new EngineBlock_Corto_Filter_Command_AttributeReleasePolicy(),

            // Convert all attributes to their OID format (if known) and add these.
            new EngineBlock_Corto_Filter_Command_AddOidAttributes(),

            // Run custom attribute manipulations
            new EngineBlock_Corto_Filter_Command_RunAttributeManipulations(),

            // Set the persistent Identifier for this user on this SP
            new EngineBlock_Corto_Filter_Command_SetPersistentId(),

            // Apply ARP to custom added attributes one last time for the eduPersonTargetedId
            new EngineBlock_Corto_Filter_Command_AttributeReleasePolicy(),

            // Log the login
            new EngineBlock_Corto_Filter_Command_LogLogin(),
        );
    }
}
<commit_msg>BACKLOG-503: As a SCN admin I only want to add non-OID urns in the ServiceRegistry ARPs<commit_after><?php
/**
 * SURFconext EngineBlock
 *
 * LICENSE
 *
 * Copyright 2011 SURFnet bv, The Netherlands
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 *
 * @category  SURFconext EngineBlock
 * @package
 * @copyright Copyright © 2010-2011 SURFnet SURFnet bv, The Netherlands (http://www.surfnet.nl)
 * @license   http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 */

/**
 * Called by Corto *after consent*, just as it prepares to send the response to the SP
 */
class EngineBlock_Corto_Filter_Output extends EngineBlock_Corto_Filter_Abstract
{
    /**
     * These commands will be evaluated in order.
     *
     * A command can throw an exception and halt SSO,
     * it can manipulate the response or it's attributes or it can communicate with external systems.
     * One thing it can't do is communicate with the user.
     *
     * @return array
     */
    protected function _getCommands()
    {
        return array(
            // If EngineBlock is in Processing mode (redirecting to it's self)
            // Then don't continue with the rest of the modifications
            new EngineBlock_Corto_Filter_Command_RejectProcessingMode(),

            // Check if the request was for a VO, if it was, validate that the user is a member of that vo
            new EngineBlock_Corto_Filter_Command_ValidateVoMembership(),

            // Add collabPersonId attribute
            new EngineBlock_Corto_Filter_Command_AddCollabPersonIdAttribute(),

            // Validate the license for this user / Service Provider
            new EngineBlock_Corto_Filter_Command_ValidateLicense(),

            // Aggregate attributes from other sources (only VOManage for now)
            new EngineBlock_Corto_Filter_Command_AggregateAttributes(),

            // If the SP requires knowledge of the VO memberships, add it to the isMemberOf attribute.
            new EngineBlock_Corto_Filter_Command_AddVoMemberships(),

            // Apply ARP before we add the OID variants
            new EngineBlock_Corto_Filter_Command_AttributeReleasePolicy(),

            // Run custom attribute manipulations
            new EngineBlock_Corto_Filter_Command_RunAttributeManipulations(),

            // Set the persistent Identifier for this user on this SP
            new EngineBlock_Corto_Filter_Command_SetPersistentId(),

            // Apply ARP to custom added attributes one last time for the eduPersonTargetedId
            new EngineBlock_Corto_Filter_Command_AttributeReleasePolicy(),

            // Convert all attributes to their OID format (if known) and add these.
            new EngineBlock_Corto_Filter_Command_AddOidAttributes(),

            // Log the login
            new EngineBlock_Corto_Filter_Command_LogLogin(),
        );
    }
}

{'fraction_non_alphanumeric': 0.0583733493397359, 'fraction_numerical': 0.006452581032412965, 'mean_word_length': 2.8437139561707037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '402662', 'n_tokens_mistral': 1760, 'n_tokens_neox': 1683, 'n_words': 661}