You are here

public function OAuthStorePostgreSQL::getConsumerRequestToken in Lingotek Translation 7.7

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

Fetch the consumer request token, by request token.

Parameters

string token:

Return value

array token and consumer details

Overrides OAuthStoreAbstract::getConsumerRequestToken

File

lib/oauth-php/library/store/OAuthStorePostgreSQL.php, line 1254

Class

OAuthStorePostgreSQL

Code

public function getConsumerRequestToken($token) {
  $rs = $this
    ->query_row_assoc('
                SELECT    ost_token            as token,
                        ost_token_secret    as token_secret,
                        osr_consumer_key    as consumer_key,
                        osr_consumer_secret    as consumer_secret,
                        ost_token_type        as token_type,
                         ost_callback_url    as callback_url,
                         osr_application_title as application_title,
                         osr_application_descr as application_descr,
                         osr_application_uri   as application_uri
                FROM oauth_server_token
                        JOIN oauth_server_registry
                        ON ost_osr_id_ref = osr_id
                WHERE ost_token_type = \'request\'
                  AND ost_token      = \'%s\'
                  AND ost_token_ttl  >= NOW()
                ', $token);
  return $rs;
}