From 7d0c1bb737f3683cd770ebd757d938f39a9b55ef Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 18 Feb 2018 20:24:41 -0500 Subject: [PATCH] Created test vehicle module oauth2test --- Zotlabs/Module/Oauth2test.php | 43 +++++++++++++++++++++++++++++++++++ view/css/mod_oauth2test.css | 4 ++++ view/tpl/oauth2test.tpl | 13 +++++++++++ 3 files changed, 60 insertions(+) create mode 100644 Zotlabs/Module/Oauth2test.php create mode 100644 view/css/mod_oauth2test.css create mode 100644 view/tpl/oauth2test.tpl diff --git a/Zotlabs/Module/Oauth2test.php b/Zotlabs/Module/Oauth2test.php new file mode 100644 index 000000000..14aa6137a --- /dev/null +++ b/Zotlabs/Module/Oauth2test.php @@ -0,0 +1,43 @@ + z_root(), + '$endpoints' => array( + array( + 'oauth2test', + array( + array( + 'action', 'create_db' + ) + ), + 'oauth2test_create_db', + 'Create the OAuth2 database tables' + ) + ) + )); + + return $o; + } + + function post() { + + logger(json_encode($_POST), LOGGER_DEBUG); + + switch ($_POST['action']) { + case 'create_db': + logger('Creating database tables...', LOGGER_DEBUG); + break; + + default: + break; + } + + } + +} diff --git a/view/css/mod_oauth2test.css b/view/css/mod_oauth2test.css new file mode 100644 index 000000000..0ef2896b5 --- /dev/null +++ b/view/css/mod_oauth2test.css @@ -0,0 +1,4 @@ +.oath2test-form-box { + border: #ccc thin solid; + padding: 1em; +} \ No newline at end of file diff --git a/view/tpl/oauth2test.tpl b/view/tpl/oauth2test.tpl new file mode 100644 index 000000000..d4887063c --- /dev/null +++ b/view/tpl/oauth2test.tpl @@ -0,0 +1,13 @@ +

OAuth 2.0 Test Vehicle

+ +{{foreach $endpoints as $ept}} +
+
+

{{$ept.3}}

+

{{$baseurl}}/{{$ept.0}}/?{{foreach $ept.1 as $field}}{{$field.0}}={{$field.1}}& {{/foreach}} +

+ + +
+
+{{/foreach}} \ No newline at end of file