src/Webiny/Login/Login.php
private function isDeviceSessionValid($deviceToken)
    {
        $devices = $this->getMeta()->allowedDevices;
        $deviceTtl = $this->config->get('DeviceTtl', $this->defaultDeviceTtl);

        $currentDeviceFingerprint = $this->getDeviceFingerprint();

        foreach ($devices as $d) {
            if ($d['token'] == $deviceToken && ($d['created'] + (86400 * $deviceTtl)) > time() && $d['device'] == $currentDeviceFingerprint) {
                return true;
            }
        }

        return false;
    }
private function isDeviceSessionValid($deviceToken)
    {
        $devices = $this->getMeta()->allowedDevices;
        $deviceTtl = $this->config->get('DeviceTtl', $this->defaultDeviceTtl);

        $currentDeviceFingerprint = $this->getDeviceFingerprint();

        foreach ($devices as $d) {
            if ($d['token'] == $deviceToken && ($d['created'] + (86400 * $deviceTtl)) > time() && $d['device'] == $currentDeviceFingerprint) {
                return true;
            }
        }

        return false;
    }
private function isDeviceSessionValid ( $ deviceToken ) { $ devices = $ this -> getMeta ( ) -> allowedDevices ; $ deviceTtl = $ this -> config -> get ( 'DeviceTtl' , $ this -> defaultDeviceTtl ) ; $ currentDeviceFingerprint = $ this -> getDeviceFingerprint ( ) ; foreach ( $ devices as $ d ) { if ( $ d [ 'token' ] == $ deviceToken && ( $ d [ 'created' ] + ( 86400 * $ deviceTtl ) ) > time ( ) && $ d [ 'device' ] == $ currentDeviceFingerprint ) { return true ; } } return false ; }
Check if the given device token is still valid.

@param $deviceToken

@return bool
@throws LoginException
Check if the given device token is still valid .