public function checkSecure()
    {
        if ($this->secure === null)
            return true;

        $in_secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on';
        return ($this->secure && $in_secure) || (! $this->secure && ! $in_secure);
    }