Skip to content

Commit e93980a

Browse files
committed
remove error_log and add HUGE warning sign
1 parent c045b4d commit e93980a

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

solid/lib/ClientAuth.php

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
<?php
2+
/*
3+
IMPORTANT WARNING!
4+
5+
This class is a user backend that accepts 'all'.
6+
Any user, and password is currently accepted as true.
7+
8+
The reason this is here is that Solid clients will use basic
9+
authentication to do a POST request to the token endpoint,
10+
where the actual authorization happens.
11+
12+
The security for this user backend lies in the fact that it
13+
is only activated for the token endpoint in the Solid app.
14+
15+
It is completely unsuitable as an actual user backend in the
16+
normal sense of the word.
17+
18+
It is here to allow the token requests with basic
19+
authentication requests to pass to us.
20+
*/
21+
222
namespace OCA\Solid;
323

424
use OCP\User\Backend\ABackend;
@@ -9,40 +29,31 @@
929
*/
1030
class ClientAuth extends ABackend implements ICheckPasswordBackend {
1131
public function __construct() {
12-
error_log("SO Constructed solid client auth backend");
1332
}
1433

1534
public function checkPassword(string $username, string $password) {
16-
error_log("SO checking password for $username");
1735
return true;
1836
}
1937

2038
public function getBackendName() {
21-
error_log("SO getBackendName");
2239
return "Solid";
2340
}
2441
public function deleteUser($uid) {
25-
error_log("SO deleteUser");
2642
return false;
2743
}
2844
public function getUsers($search = "", $limit = null, $offset = null, $callback = null) {
29-
error_log("SO getUsers");
3045
return [];
3146
}
3247
public function userExists($uid) {
33-
error_log("SO User exists");
3448
return true;
3549
}
3650
public function getDisplayName($uid) {
37-
error_log("SO getDisplayName");
3851
return "Solid client";
3952
}
4053
public function getDisplayNames($search = "", $limit = null, $offset = null) {
41-
error_log("SO getDisplayNames");
4254
return [];
4355
}
4456
public function hasUserListings() {
45-
error_log("SO hasUserListings");
4657
return false;
4758
}
4859
}

0 commit comments

Comments
 (0)