diff --git a/lib/REST.php b/lib/REST.php
index fa2b1ec4..d7d64857 100644
--- a/lib/REST.php
+++ b/lib/REST.php
@@ -40,12 +40,12 @@ class REST {
'match' => "/fever/",
'strip' => "/fever/",
'class' => REST\Fever\API::class,
- ],
+ ],/*
'microsub' => [ // Microsub https://indieweb.org/Microsub
'match' => "/microsub",
'strip' => "",
'class' => REST\Microsub\API::class,
- ],
+ ],*/
'microsub_auth' => [ // IndieAuth for Microsub https://indieauth.spec.indieweb.org/
'match' => "/u/",
'strip' => "/u/",
diff --git a/lib/REST/Microsub/Auth.php b/lib/REST/Microsub/Auth.php
index 203a9470..ebc006e4 100644
--- a/lib/REST/Microsub/Auth.php
+++ b/lib/REST/Microsub/Auth.php
@@ -20,9 +20,9 @@ class Auth extends \JKingWeb\Arsse\REST\AbstractHandler {
const SCOPES = ["read", "follow", "channels"];
/** The list of the logical functions of this API, with their implementations */
const FUNCTIONS = [
- 'discovery' => ['GET' => "opDiscovery"],
- 'auth' => ['GET' => "opLogin", 'POST' => "opCodeVerification"],
- 'token' => ['GET' => "opTokenVerification", 'POST' => "opIssueAccessToken"],
+ '' => ['GET' => "opDiscovery"],
+ 'auth' => ['GET' => "opLogin", 'POST' => "opCodeVerification"],
+ 'token' => ['GET' => "opTokenVerification", 'POST' => "opIssueAccessToken"],
];
/** The minimal set of reserved URL characters which must be escaped when comparing user ID URLs */
const USERNAME_ESCAPES = [
@@ -43,9 +43,8 @@ class Auth extends \JKingWeb\Arsse\REST\AbstractHandler {
}
// gather the query parameters and act on the "f" (function) parameter
$process = $req->getQueryParams()['f'] ?? "";
- $process = strlen($process) ? $process : "discovery";
$method = $req->getMethod();
- if (isset(self::FUNCTIONS[$process]) || ($process === "discovery" && !strlen($path)) || ($process !== "discovery" && strlen($path))) {
+ if (isset(self::FUNCTIONS[$process]) || ($process === "" && !strlen($path)) || ($process !== "" && strlen($path))) {
// the function requested needs to exist
// the path should also be empty unless we're doing discovery
return new EmptyResponse(404);
diff --git a/tests/cases/REST/Microsub/TestAuth.php b/tests/cases/REST/Microsub/TestAuth.php
new file mode 100644
index 00000000..f4eb5797
--- /dev/null
+++ b/tests/cases/REST/Microsub/TestAuth.php
@@ -0,0 +1,16 @@
+ */
+class TestAuth extends \JKingWeb\Arsse\Test\AbstractTest {
+}
diff --git a/tests/phpunit.dist.xml b/tests/phpunit.dist.xml
index cae3734f..d116d3e2 100644
--- a/tests/phpunit.dist.xml
+++ b/tests/phpunit.dist.xml
@@ -124,6 +124,9 @@
cases/REST/Fever/TestAPI.php
cases/REST/Fever/PDO/TestAPI.php
+
+ cases/REST/Microsub/TestAuth.php
+
cases/Service/TestService.php
cases/CLI/TestCLI.php