/** * Stores an access token in the OAuth Data Store. * @param tokenKey information about the Gadget storing the token. * @param tokenInfo the TokenInfo to be stored in the OAuth data store. */ public function storeTokenKeyAndSecret($tokenKey, $tokenInfo) { $getGadgetUri = $tokenKey->getGadgetUri(); if (empty($getGadgetUri)) { throw new Exception("found empty gadget URI in TokenKey"); } $getUserId = $tokenKey->getUserId(); if (empty($getUserId)) { throw new Exception("found empty userId in TokenKey"); } $this->store->setTokenAndSecret($tokenKey, $tokenInfo); }