'GET', 'POST' => 'POST'); public static $SignatureType = array('HMAC_SHA1' => 'HMAC_SHA1', 'RSA_SHA1' => 'RSA_SHA1', 'PLAINTEXT' => 'PLAINTEXT'); public static $KeyType = array('HMAC_SYMMETRIC' => 'HMAC_SYMMETRIC', 'RSA_PRIVATE' => 'RSA_PRIVATE'); public static $OAuthParamLocation = array('AUTH_HEADER' => 'auth-header', 'POST_BODY' => 'post-body', 'URI_QUERY' => 'uri-query'); } class AccesorInfo { /** * @var OAuthAccessor */ public $accessor; public $httpMethod; public $signatureType; public $paramLocation; public function getParamLocation() { return $this->paramLocation; } public function setParamLocation($paramLocation) { $this->paramLocation = $paramLocation; } /** * @return OAuthAccessor */ public function getAccessor() { return $this->accessor; } public function setAccessor($accessor) { $this->accessor = $accessor; } public function getHttpMethod() { return $this->httpMethod; } public function setHttpMethod($httpMethod) { $this->httpMethod = $httpMethod; } public function getSignatureType() { return $this->signatureType; } public function setSignatureType($signatureType) { $this->signatureType = $signatureType; } } class ConsumerKeyAndSecret { private $consumerKey; private $consumerSecret; private $keyType; public function ConsumerKeyAndSecret($key, $secret, $type) { $this->consumerKey = $key; $this->consumerSecret = $secret; $this->keyType = $type; } public function getConsumerKey() { return $this->consumerKey; } public function getConsumerSecret() { return $this->consumerSecret; } public function getKeyType() { return $this->keyType; } } class ProviderKey { private $gadgetUri; private $serviceName; public function getGadgetUri() { return $this->gadgetUri; } public function setGadgetUri($gadgetUri) { $this->gadgetUri = $gadgetUri; } public function getServiceName() { return $this->serviceName; } public function setServiceName($serviceName) { $this->serviceName = $serviceName; } } class ProviderInfo { private $provider; private $httpMethod; private $signatureType; private $paramLocation; // this can be null if we have not negotiated a consumer key and secret // yet with the provider, or if we decided that we want to use a global // public key private $keyAndSecret; public function getParamLocation() { return $this->paramLocation; } public function setParamLocation($paramLocation) { $this->paramLocation = $paramLocation; } public function getKeyAndSecret() { return $this->keyAndSecret; } public function setKeyAndSecret($keyAndSecret) { $this->keyAndSecret = $keyAndSecret; } public function getProvider() { return $this->provider; } public function setProvider(OAuthServiceProvider $provider) { $this->provider = $provider; } public function getHttpMethod() { return $this->httpMethod; } public function setHttpMethod($httpMethod) { $this->httpMethod = $httpMethod; } public function getSignatureType() { return $this->signatureType; } public function setSignatureType($signatureType) { $this->signatureType = $signatureType; } } class TokenKey { private $userId; private $gadgetUri; private $moduleId; private $tokenName; private $serviceName; private $appId; public function getAppId() { return $this->appId; } public function setAppId($appId) { $this->appId = $appId; } public function getUserId() { return $this->userId; } public function setUserId($userId) { $this->userId = $userId; } public function getGadgetUri() { return $this->gadgetUri; } public function setGadgetUri($gadgetUri) { $this->gadgetUri = $gadgetUri; } public function getModuleId() { return $this->moduleId; } public function setModuleId($moduleId) { $this->moduleId = $moduleId; } public function getTokenName() { return $this->tokenName; } public function setTokenName($tokenName) { $this->tokenName = $tokenName; } public function getServiceName() { return $this->serviceName; } public function setServiceName($serviceName) { $this->serviceName = $serviceName; } } class TokenInfo { private $accessToken; private $tokenSecret; public function __construct($token, $secret) { $this->accessToken = $token; $this->tokenSecret = $secret; } public function getAccessToken() { return $this->accessToken; } public function getTokenSecret() { return $this->tokenSecret; } }