diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-15 03:46:37 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-15 03:46:37 +0000 |
commit | 6c8c03142db734678d460ee085a73df1d05a88a1 (patch) | |
tree | 2ae02d3f7f68fbc7c16aed798dcae16047531767 /mod/oauth_api/vendors/oauth/example/server/www/register.php | |
parent | 74d029022863a78500ec76bdf000b781b5838544 (diff) | |
download | elgg-6c8c03142db734678d460ee085a73df1d05a88a1.tar.gz elgg-6c8c03142db734678d460ee085a73df1d05a88a1.tar.bz2 |
Refs #3115. Moved oauth_lib to oauth_api.
git-svn-id: http://code.elgg.org/elgg/trunk@8715 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/oauth_api/vendors/oauth/example/server/www/register.php')
-rw-r--r-- | mod/oauth_api/vendors/oauth/example/server/www/register.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mod/oauth_api/vendors/oauth/example/server/www/register.php b/mod/oauth_api/vendors/oauth/example/server/www/register.php new file mode 100644 index 000000000..c5785c2c8 --- /dev/null +++ b/mod/oauth_api/vendors/oauth/example/server/www/register.php @@ -0,0 +1,28 @@ +<?php + +require_once '../core/init.php'; + +assert_logged_in(); + +if ($_SERVER['REQUEST_METHOD'] == 'POST') +{ + try + { + $store = OAuthStore::instance(); + $key = $store->updateConsumer($_POST, 1, true); + + $c = $store->getConsumer($key); + echo 'Your consumer key is: <strong>' . $c['consumer_key'] . '</strong><br />'; + echo 'Your consumer secret is: <strong>' . $c['consumer_secret'] . '</strong><br />'; + } + catch (OAuthException $e) + { + echo '<strong>Error: ' . $e->getMessage() . '</strong><br />'; + } +} + + +$smarty = session_smarty(); +$smarty->display('register.tpl'); + +?>
\ No newline at end of file |