You are here

function _oauth_init_server in OAuth 1.0 6

Initialize and store an OAuthServer object.

3 calls to _oauth_init_server()
oauth_access_token in ./oauth.module
oauth_grant_access_submit in ./oauth.module
Asks users for granting proper access/deny permissions for different services
oauth_request_token in ./oauth.module
Generate a request token from the request

File

./oauth.module, line 119

Code

function _oauth_init_server() {
  static $server = null;
  require_once "OAuth.php";
  require_once "OAuth_TestServer.php";
  $server = new OAuthServer(new DrupalOAuthDataStore());
  $hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
  $plaintext_method = new OAuthSignatureMethod_PLAINTEXT();
  $rsa_method = new TestOAuthSignatureMethod_RSA_SHA1();
  $server
    ->add_signature_method($hmac_method);
  $server
    ->add_signature_method($plaintext_method);
  $server
    ->add_signature_method($rsa_method);
  return $server;
}