lib/Disco.php
public function removeAuthContextClassRefWithPrefix(&$state)
    {
        $conf = Configuration::getConfig(self::CONFIG_FILE_NAME);
        $prefix = $conf->getString(self::PROPNAME_PREFIX, null);

        if (is_null($prefix)) {
            return;
        }
        unset($state['saml:RequestedAuthnContext']['AuthnContextClassRef']);
        $array = array();
        foreach ($this->authnContextClassRef as $value) {
            if (!(substr($value, 0, strlen($prefix)) === $prefix)) {
                array_push($array, $value);
            }
        }
        if (!empty($array)) {
            $state['saml:RequestedAuthnContext']['AuthnContextClassRef']
                = $array;
        }
    }
public function removeAuthContextClassRefWithPrefix(&$state)
    {
        $conf = Configuration::getConfig(self::CONFIG_FILE_NAME);
        $prefix = $conf->getString(self::PROPNAME_PREFIX, null);

        if (is_null($prefix)) {
            return;
        }
        unset($state['saml:RequestedAuthnContext']['AuthnContextClassRef']);
        $array = array();
        foreach ($this->authnContextClassRef as $value) {
            if (!(substr($value, 0, strlen($prefix)) === $prefix)) {
                array_push($array, $value);
            }
        }
        if (!empty($array)) {
            $state['saml:RequestedAuthnContext']['AuthnContextClassRef']
                = $array;
        }
    }
public function removeAuthContextClassRefWithPrefix ( & $ state ) { $ conf = Configuration :: getConfig ( self :: CONFIG_FILE_NAME ) ; $ prefix = $ conf -> getString ( self :: PROPNAME_PREFIX , null ) ; if ( is_null ( $ prefix ) ) { return ; } unset ( $ state [ 'saml:RequestedAuthnContext' ] [ 'AuthnContextClassRef' ] ) ; $ array = array ( ) ; foreach ( $ this -> authnContextClassRef as $ value ) { if ( ! ( substr ( $ value , 0 , strlen ( $ prefix ) ) === $ prefix ) ) { array_push ( $ array , $ value ) ; } } if ( ! empty ( $ array ) ) { $ state [ 'saml:RequestedAuthnContext' ] [ 'AuthnContextClassRef' ] = $ array ; } }
This method remove all AuthnContextClassRef which start with prefix from configuration
@param $state
This method remove all AuthnContextClassRef which start with prefix from configuration