public function setToken(UserSession $user, Token $token)
    {
        $item = $this->cacheItemPool->getItem($this->cacheKey($user));
        $item->set($token);
        // @todo Test that these values are compatible.
        $item->expiresAfter($token->getLifetime());
        $this->cacheItemPool->save($item);
    }
public function setToken(UserSession $user, Token $token)
    {
        $item = $this->cacheItemPool->getItem($this->cacheKey($user));
        $item->set($token);
        // @todo Test that these values are compatible.
        $item->expiresAfter($token->getLifetime());
        $this->cacheItemPool->save($item);
    }
public function setToken ( UserSession $ user , Token $ token ) { $ item = $ this -> cacheItemPool -> getItem ( $ this -> cacheKey ( $ user ) ) ; $ item -> set ( $ token ) ; // @todo Test that these values are compatible. $ item -> expiresAfter ( $ token -> getLifetime ( ) ) ; $ this -> cacheItemPool -> save ( $ item ) ; }
Set an authentication token for a user.

@param \Lullabot\Mpx\Service\IdentityManagement\UserSession $user  The user the token is associated with.
@param \Lullabot\Mpx\Token                                  $token The authentication token for the user.
Set an authentication token for a user .