original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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.
docstring_tokens: Set an authentication token for a user .