You are here

public function OAuthStoreOracle::deleteServerToken in Lingotek Translation 7.3

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

* Delete a token we obtained from a server. * *

Parameters

string consumer_key: * @param string token * @param int user_id * @param boolean user_is_admin

Overrides OAuthStoreAbstract::deleteServerToken

1 call to OAuthStoreOracle::deleteServerToken()
OAuthStoreOracle::setServerTokenTtl in lib/oauth-php/library/store/OAuthStoreOracle.php
* Set the ttl of a server access token. This is done when the * server receives a valid request with a xoauth_token_ttl parameter in it. * *

File

lib/oauth-php/library/store/OAuthStoreOracle.php, line 604

Class

OAuthStoreOracle

Code

public function deleteServerToken($consumer_key, $token, $user_id, $user_is_admin = false) {

  //
  $sql = "BEGIN SP_DELETE_SERVER_TOKEN(:P_CONSUMER_KEY, :P_USER_ID,:P_TOKEN, :P_USER_IS_ADMIN, :P_RESULT); END;";

  // parse sql
  $stmt = oci_parse($this->conn, $sql) or die('Can not parse query');

  // Bind In and Out Variables
  oci_bind_by_name($stmt, ':P_CONSUMER_KEY', $consumer_key, 255);
  oci_bind_by_name($stmt, ':P_USER_ID', $user_id, 40);
  oci_bind_by_name($stmt, ':P_TOKEN', $token, 255);
  oci_bind_by_name($stmt, ':P_USER_IS_ADMIN', $user_is_admin, 40);
  oci_bind_by_name($stmt, ':P_RESULT', $result, 20);

  //Execute the statement
  oci_execute($stmt);

  //
}