public function createToken()
    {
        $time = microtime(true);
        $token = $this->generate();

        $store = $this->getStore();

        $pool = $this->invalidate($store->getTokens());

        $pool[] = [
            'ts' => $time,
            'token' => $token
        ];

        $store->setTokens($pool);

        return $token;
    }
public function createToken()
    {
        $time = microtime(true);
        $token = $this->generate();

        $store = $this->getStore();

        $pool = $this->invalidate($store->getTokens());

        $pool[] = [
            'ts' => $time,
            'token' => $token
        ];

        $store->setTokens($pool);

        return $token;
    }
public function createToken ( ) { $ time = microtime ( true ) ; $ token = $ this -> generate ( ) ; $ store = $ this -> getStore ( ) ; $ pool = $ this -> invalidate ( $ store -> getTokens ( ) ) ; $ pool [ ] = [ 'ts' => $ time , 'token' => $ token ] ; $ store -> setTokens ( $ pool ) ; return $ token ; }
Generates, stores and return a brand new token
Triggers the pool invalidation.

@return string the token
Generates stores and return a brand new token Triggers the pool invalidation .