You are here

class OAuthStore2Leg in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.2 lib/oauth-php/library/store/OAuthStore2Leg.php \OAuthStore2Leg
  2. 7.3 lib/oauth-php/library/store/OAuthStore2Leg.php \OAuthStore2Leg
  3. 7.4 lib/oauth-php/library/store/OAuthStore2Leg.php \OAuthStore2Leg
  4. 7.5 lib/oauth-php/library/store/OAuthStore2Leg.php \OAuthStore2Leg
  5. 7.6 lib/oauth-php/library/store/OAuthStore2Leg.php \OAuthStore2Leg

Hierarchy

Expanded class hierarchy of OAuthStore2Leg

File

lib/oauth-php/library/store/OAuthStore2Leg.php, line 35

View source
class OAuthStore2Leg extends OAuthStoreAbstract {
  protected $consumer_key;
  protected $consumer_secret;
  protected $signature_method = array(
    'HMAC-SHA1',
  );
  protected $token_type = false;

  /*
   * Takes two options: consumer_key and consumer_secret
   */
  public function __construct($options = array()) {
    if (isset($options['consumer_key']) && isset($options['consumer_secret'])) {
      $this->consumer_key = $options['consumer_key'];
      $this->consumer_secret = $options['consumer_secret'];
    }
    else {
      throw new OAuthException2("OAuthStore2Leg needs consumer_token and consumer_secret");
    }
  }
  public function getSecretsForVerify($consumer_key, $token, $token_type = 'access') {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getSecretsForSignature($uri, $user_id) {
    return array(
      'consumer_key' => $this->consumer_key,
      'consumer_secret' => $this->consumer_secret,
      'signature_methods' => $this->signature_method,
      'token' => $this->token_type,
    );
  }
  public function getServerTokenSecrets($consumer_key, $token, $token_type, $user_id, $name = '') {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function addServerToken($consumer_key, $token_type, $token, $token_secret, $user_id, $options = array()) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function deleteServer($consumer_key, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getServer($consumer_key, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getServerForUri($uri, $user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function listServerTokens($user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function countServerTokens($consumer_key) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getServerToken($consumer_key, $token, $user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function deleteServerToken($consumer_key, $token, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function setServerTokenTtl($consumer_key, $token, $token_ttl) {

    //This method just needs to exist. It doesn't have to do anything!
  }
  public function listServers($q = '', $user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function updateServer($server, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function updateConsumer($consumer, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function deleteConsumer($consumer_key, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getConsumer($consumer_key, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getConsumerStatic() {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function addConsumerRequestToken($consumer_key, $options = array()) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getConsumerRequestToken($token) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function deleteConsumerRequestToken($token) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function authorizeConsumerRequestToken($token, $user_id, $referrer_host = '') {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function countConsumerAccessTokens($consumer_key) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function exchangeConsumerRequestForAccessToken($token, $options = array()) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function getConsumerAccessToken($token, $user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function deleteConsumerAccessToken($token, $user_id, $user_is_admin = false) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function setConsumerAccessTokenTtl($token, $ttl) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function listConsumers($user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function listConsumerApplications($begin = 0, $total = 25) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function listConsumerTokens($user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function checkServerNonce($consumer_key, $token, $timestamp, $nonce) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function addLog($keys, $received, $sent, $base_string, $notes, $user_id = null) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function listLog($options, $user_id) {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }
  public function install() {
    throw new OAuthException2("OAuthStore2Leg doesn't support " . __METHOD__);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
OAuthStore2Leg::$consumer_key protected property
OAuthStore2Leg::$consumer_secret protected property
OAuthStore2Leg::$signature_method protected property
OAuthStore2Leg::$token_type protected property
OAuthStore2Leg::addConsumerRequestToken public function Overrides OAuthStoreAbstract::addConsumerRequestToken
OAuthStore2Leg::addLog public function Overrides OAuthStoreAbstract::addLog
OAuthStore2Leg::addServerToken public function Overrides OAuthStoreAbstract::addServerToken
OAuthStore2Leg::authorizeConsumerRequestToken public function Overrides OAuthStoreAbstract::authorizeConsumerRequestToken
OAuthStore2Leg::checkServerNonce public function Overrides OAuthStoreAbstract::checkServerNonce
OAuthStore2Leg::countConsumerAccessTokens public function Overrides OAuthStoreAbstract::countConsumerAccessTokens
OAuthStore2Leg::countServerTokens public function Overrides OAuthStoreAbstract::countServerTokens
OAuthStore2Leg::deleteConsumer public function Overrides OAuthStoreAbstract::deleteConsumer
OAuthStore2Leg::deleteConsumerAccessToken public function Overrides OAuthStoreAbstract::deleteConsumerAccessToken
OAuthStore2Leg::deleteConsumerRequestToken public function Overrides OAuthStoreAbstract::deleteConsumerRequestToken
OAuthStore2Leg::deleteServer public function Overrides OAuthStoreAbstract::deleteServer
OAuthStore2Leg::deleteServerToken public function Overrides OAuthStoreAbstract::deleteServerToken
OAuthStore2Leg::exchangeConsumerRequestForAccessToken public function Overrides OAuthStoreAbstract::exchangeConsumerRequestForAccessToken
OAuthStore2Leg::getConsumer public function Overrides OAuthStoreAbstract::getConsumer
OAuthStore2Leg::getConsumerAccessToken public function Overrides OAuthStoreAbstract::getConsumerAccessToken
OAuthStore2Leg::getConsumerRequestToken public function Overrides OAuthStoreAbstract::getConsumerRequestToken
OAuthStore2Leg::getConsumerStatic public function Overrides OAuthStoreAbstract::getConsumerStatic
OAuthStore2Leg::getSecretsForSignature public function Overrides OAuthStoreAbstract::getSecretsForSignature
OAuthStore2Leg::getSecretsForVerify public function Overrides OAuthStoreAbstract::getSecretsForVerify
OAuthStore2Leg::getServer public function Overrides OAuthStoreAbstract::getServer
OAuthStore2Leg::getServerForUri public function Overrides OAuthStoreAbstract::getServerForUri
OAuthStore2Leg::getServerToken public function Overrides OAuthStoreAbstract::getServerToken
OAuthStore2Leg::getServerTokenSecrets public function Overrides OAuthStoreAbstract::getServerTokenSecrets
OAuthStore2Leg::install public function Overrides OAuthStoreAbstract::install
OAuthStore2Leg::listConsumerApplications public function Overrides OAuthStoreAbstract::listConsumerApplications
OAuthStore2Leg::listConsumers public function Overrides OAuthStoreAbstract::listConsumers
OAuthStore2Leg::listConsumerTokens public function Overrides OAuthStoreAbstract::listConsumerTokens
OAuthStore2Leg::listLog public function Overrides OAuthStoreAbstract::listLog
OAuthStore2Leg::listServers public function Overrides OAuthStoreAbstract::listServers
OAuthStore2Leg::listServerTokens public function Overrides OAuthStoreAbstract::listServerTokens
OAuthStore2Leg::setConsumerAccessTokenTtl public function Overrides OAuthStoreAbstract::setConsumerAccessTokenTtl
OAuthStore2Leg::setServerTokenTtl public function
OAuthStore2Leg::updateConsumer public function Overrides OAuthStoreAbstract::updateConsumer
OAuthStore2Leg::updateServer public function Overrides OAuthStoreAbstract::updateServer
OAuthStore2Leg::__construct public function
OAuthStoreAbstract::generateKey public function * Generate a unique key * *
OAuthStoreAbstract::isUTF8 protected function * Check to see if a string is valid utf8 * *
OAuthStoreAbstract::makeUTF8 protected function * Make a string utf8, replacing all non-utf8 chars with a '.' * *