if (($redirectUrl !== null) &&
            (!filter_var($redirectUrl, FILTER_VALIDATE_URL)
                || !in_array(strtolower(parse_url($redirectUrl, PHP_URL_SCHEME)), self::$supportedProtocols))
        ) {
            throw new \RuntimeException(sprintf('Invalid redirect URL "%s"', $redirectUrl), 1475486589);