src/SDK/Corundum.php
protected function tokenUpdate(string $user, Slice $slice): Slice
    {
        try
        {
            $token  = $this->refreshToken($user);
            $verify = $this->verify($token);

            if (!$verify || !$verify->getRequired('verify'))
            {
                throw new Invalid('The token isn\'t verified');
            }
        }
        catch (Invalid $invalid)
        {
            $this->tokens[$user] = null;

            $token = $this->getToken(
                $user,
                $slice->getData('scope', '')
            );
        }

        return $token;
    }
protected function tokenUpdate(string $user, Slice $slice): Slice
    {
        try
        {
            $token  = $this->refreshToken($user);
            $verify = $this->verify($token);

            if (!$verify || !$verify->getRequired('verify'))
            {
                throw new Invalid('The token isn\'t verified');
            }
        }
        catch (Invalid $invalid)
        {
            $this->tokens[$user] = null;

            $token = $this->getToken(
                $user,
                $slice->getData('scope', '')
            );
        }

        return $token;
    }
@param string $user
@param Slice  $slice

@return Slice

@throws Invalid