common.inc.php 676 B

1234567891011121314151617181920212223242526
  1. <?php
  2. require_once("../init.php");
  3. require_once("../code/OAuth_TestServer.php");
  4. /*
  5. * Config Section
  6. */
  7. $domain = $_SERVER['HTTP_HOST'];
  8. $base = "/oauth/example";
  9. $base_url = "http://$domain$base";
  10. /**
  11. * Some default objects
  12. */
  13. $test_server = new TestOAuthServer(new MockOAuthDataStore());
  14. $hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
  15. $plaintext_method = new OAuthSignatureMethod_PLAINTEXT();
  16. $rsa_method = new TestOAuthSignatureMethod_RSA_SHA1();
  17. $test_server->add_signature_method($hmac_method);
  18. $test_server->add_signature_method($plaintext_method);
  19. $test_server->add_signature_method($rsa_method);
  20. $sig_methods = $test_server->get_signature_methods();
  21. ?>