You are here

function SimpleOAuthDataStore::new_token in OAuth 1.0 6

2 calls to SimpleOAuthDataStore::new_token()
SimpleOAuthDataStore::new_access_token in ./OAuth.php
SimpleOAuthDataStore::new_request_token in ./OAuth.php

File

./OAuth.php, line 703

Class

SimpleOAuthDataStore

Code

function new_token($consumer, $type = "request") {

  /*{{{*/
  $key = md5(time());
  $secret = time() + time();
  $token = new OAuthToken($key, md5(md5($secret)));
  if (!dba_insert("{$type}_{$key}", serialize($token), $this->dbh)) {
    throw new OAuthException("doooom!");
  }
  return $token;
}