public function decryptToken(string $token)
    {
        $tokenData = false;
        $encrypted = base64_decode($token);

        if ($encrypted) {
            $serialized = Security::decrypt($encrypted, Configure::read('Security.cryptKey'));
            $tokenData = unserialize($serialized);
        }

        return $tokenData;
    }
public function decryptToken(string $token)
    {
        $tokenData = false;
        $encrypted = base64_decode($token);

        if ($encrypted) {
            $serialized = Security::decrypt($encrypted, Configure::read('Security.cryptKey'));
            $tokenData = unserialize($serialized);
        }

        return $tokenData;
    }
public function decryptToken ( string $ token ) { $ tokenData = false ; $ encrypted = base64_decode ( $ token ) ; if ( $ encrypted ) { $ serialized = Security :: decrypt ( $ encrypted , Configure :: read ( 'Security.cryptKey' ) ) ; $ tokenData = unserialize ( $ serialized ) ; } return $ tokenData ; }
Tries to decode, decrypt and unserialize the given token and return the data as an
array

@param string $token The string token
@return array|false
Tries to decode decrypt and unserialize the given token and return the data as an array