本文整理匯總了PHP中OAuthStore::setOAuthConsumerKeyAndSecret方法的典型用法代碼示例。如果您正苦於以下問題:PHP OAuthStore::setOAuthConsumerKeyAndSecret方法的具體用法?PHP OAuthStore::setOAuthConsumerKeyAndSecret怎麽用?PHP OAuthStore::setOAuthConsumerKeyAndSecret使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OAuthStore
的用法示例。
在下文中一共展示了OAuthStore::setOAuthConsumerKeyAndSecret方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: storeConsumerKeyAndSecret
/**
* Stores a negotiated consumer key and secret in the gadget store.
* The "secret" can either be a consumer secret in the strict OAuth sense,
* or it can be a PKCS8-then-Base64 encoded private key that we'll be using
* with this service provider.
*
* @param gadgetUrl the URL of the gadget
* @param serviceName the service provider with whom we have negotiated a
* consumer key and secret.
*/
public function storeConsumerKeyAndSecret($gadgetUrl, $serviceName, $keyAndSecret)
{
$providerKey = new ProviderKey();
$providerKey->setGadgetUri($gadgetUrl);
$providerKey->setServiceName($serviceName);
$this->store->setOAuthConsumerKeyAndSecret($providerKey, $keyAndSecret);
}