コード例 #1
0
 /**
  * Builds the data we'll cache on the client while we make requests.
  */
 private function buildClientAccessState()
 {
     try {
         $oauthState = array();
         $accessor = $this->accessorInfo->getAccessor();
         $oauthState[self::$ACCESS_TOKEN_KEY] = $accessor->accessToken;
         $oauthState[self::$ACCESS_TOKEN_SECRET_KEY] = $accessor->tokenSecret;
         $oauthState[self::$OWNER_KEY] = $this->authToken->getOwnerId();
         $this->newClientState = $this->oauthCrypter->wrap($oauthState);
     } catch (BlobCrypterException $e) {
         throw new GadgetException("INTERNAL SERVER ERROR: " . $e);
     }
 }