Skip to content

Commit e6568ff

Browse files
committed
only register for the token endpoint
1 parent a9fdac7 commit e6568ff

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

solid/lib/AppInfo/Application.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,25 @@
1717
use OCP\AppFramework\Bootstrap\IBootstrap;
1818
use OCP\AppFramework\Bootstrap\IRegistrationContext;
1919
use OCP\IDBConnection;
20+
use OCP\IRequest;
21+
use OCP\Server;
2022

2123
class Application extends App implements IBootstrap {
2224
public const APP_ID = 'solid';
23-
public static $userSubDomainsEnabled;
25+
public static $userSubDomainsEnabled;
2426

2527
/**
2628
* @param array $urlParams
2729
*/
2830
public function __construct(array $urlParams = []) {
29-
$backend = new \OCA\Solid\ClientAuth();
30-
\OC::$server->getUserManager()->registerBackend($backend);
31+
$request = \OCP\Server::get(\OCP\IRequest::class);
32+
$rawPathInfo = $request->getRawPathInfo();
33+
error_log($rawPathInfo);
3134

35+
if ($rawPathInfo == '/apps/solid/token') {
36+
$backend = new \OCA\Solid\ClientAuth();
37+
\OC::$server->getUserManager()->registerBackend($backend);
38+
}
3239
parent::__construct(self::APP_ID, $urlParams);
3340
}
3441

0 commit comments

Comments
 (0)