2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
15 require_once('OAuth.php');
16 require_once('../Shindig/ATutorOAuthDataStore.php');
17 $oauthDataStore = new ATutorOAuthDataStore();
19 $server = new OAuthServer($oauthDataStore);
20 $server->add_signature_method(new OAuthSignatureMethod_HMAC_SHA1());
21 $server->add_signature_method(new OAuthSignatureMethod_PLAINTEXT());
22 $request = OAuthRequest::from_request();
23 $token = $server->fetch_request_token($request);
25 echo $token->to_string();
27 } catch (OAuthException $e) {
28 echo $e->getMessage();
29 } catch (Exception $e) {
30 echo $e->getMessage();