From 2b3f931c859b0e5b3a561c445b29035b00b4dc20 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 21 May 2018 19:25:03 -0700 Subject: oauth2 discovery per draft-ietf-oauth-discovery-10 --- Zotlabs/Module/Oauthinfo.php | 23 +++++++++++++++++++++++ Zotlabs/Module/Well_known.php | 10 +++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Zotlabs/Module/Oauthinfo.php (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Oauthinfo.php b/Zotlabs/Module/Oauthinfo.php new file mode 100644 index 000000000..6eea2e02b --- /dev/null +++ b/Zotlabs/Module/Oauthinfo.php @@ -0,0 +1,23 @@ + z_root(), + 'authorization_endpoint' => z_root() . '/authorize', + 'token_endpoint' => z_root() . '/token', + 'response_types_supported' => [ 'code', 'code token' ] + ]; + + + json_return_and_die($ret); + } + + +} \ No newline at end of file diff --git a/Zotlabs/Module/Well_known.php b/Zotlabs/Module/Well_known.php index 177de2323..442994b54 100644 --- a/Zotlabs/Module/Well_known.php +++ b/Zotlabs/Module/Well_known.php @@ -50,7 +50,15 @@ class Well_known extends \Zotlabs\Web\Controller { $module = new \Zotlabs\Module\Hostxrd(); $module->init(); break; - + + case 'oauth-authorization-server': + \App::$argc -= 1; + array_shift(\App::$argv); + \App::$argv[0] = 'oauthinfo'; + $module = new \Zotlabs\Module\Oauthinfo(); + $module->init(); + break; + case 'dnt-policy.txt': echo file_get_contents('doc/dnt-policy.txt'); killme(); -- cgit v1.2.3