File: common.inc.php

package info (click to toggle)
liboauth-php 0~svn622-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 104 kB
  • ctags: 255
  • sloc: php: 710; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
require_once("../OAuth.php");
require_once("../OAuth_TestServer.php");

/*
 * Config Section
 */
$domain = $_SERVER['HTTP_HOST'];
$base = "/oauth/example";
$base_url = "http://$domain$base";

/**
 * Some default objects
 */

$test_server = new TestOAuthServer(new MockOAuthDataStore());
$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
$plaintext_method = new OAuthSignatureMethod_PLAINTEXT();
$rsa_method = new TestOAuthSignatureMethod_RSA_SHA1();

$test_server->add_signature_method($hmac_method);
$test_server->add_signature_method($plaintext_method);
$test_server->add_signature_method($rsa_method);

$sig_methods = $test_server->get_signature_methods();
?>