private function getDeviceFingerprint()
    {
        $server = $this->httpRequest()->server();

        $did = '';
        //$did .= $server->httpAccept();
        //$did .= '|' . $server->httpAcceptCharset();
        //$did .= '|' . $server->httpAcceptEncoding();
        $did .= '|' . $server->httpAcceptLanguage();

        // append browser details
        if (empty($server->httpUserAgent())) {
            throw new LoginException('Unable to process the request without a user agent', 100);
        }

        $platform = 'unknown';
        $ub = 'unknown';

        // get the platform
        $ua = $server->httpUserAgent();
        if (preg_match('/linux/i', $ua)) {
            $platform = 'linux';
        } elseif (preg_match('/macintosh|mac os x/i', $ua)) {
            $platform = 'mac';
        } elseif (preg_match('/windows|win32/i', $ua)) {
            $platform = 'windows';
        }

        // get browser name
        if (preg_match('/MSIE/i', $ua) && !preg_match('/Opera/i', $ua)) {
            $ub = "MSIE";
        } elseif (preg_match('/Firefox/i', $ua)) {
            $ub = "Firefox";
        } elseif (preg_match('/Chrome/i', $ua)) {
            $ub = "Chrome";
        } elseif (preg_match('/Safari/i', $ua)) {
            $ub = "Safari";
        } elseif (preg_match('/Opera/i', $ua)) {
            $ub = "Opera";
        } elseif (preg_match('/Netscape/i', $ua)) {
            $ub = "Netscape";
        }

        $did .= '|' . $platform;
        $did .= '|' . $ub;

        return md5($did);
    }