Skip to content

Commit 8088220

Browse files
committed
first bits, try to register a user backend
1 parent 3ad37fa commit 8088220

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

solid/appinfo/info.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ When you do this, the Solid App can store data in your Nextcloud account through
1616
<author mail="auke@muze.nl" >Auke van Slooten</author>
1717
<namespace>Solid</namespace>
1818
<category>integration</category>
19+
<types>
20+
<authentication/>
21+
</types>
1922
<bugs>https://github.com/pdsinterop/solid-nextcloud/issues</bugs>
2023
<dependencies>
2124
<nextcloud min-version="28" max-version="30"/>

solid/lib/AppInfo/Application.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use OCA\Solid\Service\SolidWebhookService;
1111
use OCA\Solid\Db\SolidWebhookMapper;
1212
use OCA\Solid\Middleware\SolidCorsMiddleware;
13+
use OCA\Solid\ClientAuth;
1314

1415
use OCP\AppFramework\App;
1516
use OCP\AppFramework\Bootstrap\IBootContext;
@@ -67,6 +68,7 @@ public function register(IRegistrationContext $context): void {
6768
}
6869

6970
public function boot(IBootContext $context): void {
71+
\OC::$server->getUserManager()->registerBackend(new \OCA\Solid\ClientAuth());
7072
self::$userSubDomainsEnabled = OC::$server->get(AppConfig::class)->getValueBool(self::APP_ID, 'userSubDomainsEnabled');
7173
require_once(__DIR__.'/../../vendor/autoload.php');
7274
}

solid/lib/ClientAuth.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
namespace OCA\Solid;
3+
4+
use OCP\User\Backend\ABackend;
5+
use OCP\User\Backend\ICheckPasswordBackend;
6+
7+
/**
8+
* @package OCA\Solid
9+
*/
10+
class ClientAuth extends ABackend implements ICheckPasswordBackend {
11+
private $config;
12+
13+
public function __construct(IConfig $config) {
14+
$this->config = $config;
15+
}
16+
17+
public function checkPassword(string $username, string $password) {
18+
return true;
19+
}
20+
}

0 commit comments

Comments
 (0)