Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions env-vars-server.list
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SERVER_ROOT=https://server
STORAGE_ROOT=https://server/apps/solid/@alice/storage/
ALICE_WEBID=https://server/apps/solid/@alice/profile/card#me
STORAGE_ROOT=https://server/apps/solid/~alice/storage/
ALICE_WEBID=https://server/apps/solid/~alice/profile/card#me
COOKIE_TYPE=nextcloud-compatible
USERNAME=alice
PASSWORD=alice123
Expand Down
10 changes: 5 additions & 5 deletions env-vars-testers.list
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
WEBID_ALICE=https://server/apps/solid/@alice/profile/card#me
WEBID_ALICE=https://server/apps/solid/~alice/profile/card#me
OIDC_ISSUER_ALICE=https://server
STORAGE_ROOT_ALICE=https://server/apps/solid/@alice/storage/
WEBID_BOB=https://thirdparty/apps/solid/@alice/profile/card#me
STORAGE_ROOT_ALICE=https://server/apps/solid/~alice/storage/
WEBID_BOB=https://thirdparty/apps/solid/~alice/profile/card#me
OIDC_ISSUER_BOB=https://thirdparty
STORAGE_ROOT_BOB=https://thirdparty/
ALICE_WEBID=https://server/apps/solid/@alice/profile/card#me
ALICE_WEBID=https://server/apps/solid/~alice/profile/card#me
SERVER_ROOT_ESCAPED=https:\/\/server
SERVER_ROOT=https://server
STORAGE_ROOT=https://server/apps/solid/@alice/storage/
STORAGE_ROOT=https://server/apps/solid/~alice/storage/
SKIP_CONC=1
2 changes: 1 addition & 1 deletion env-vars-thirdparty.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SERVER_ROOT=https://thirdparty
ALICE_WEBID=https://thirdparty/apps/solid/@alice/profile/card#me
ALICE_WEBID=https://thirdparty/apps/solid/~alice/profile/card#me
COOKIE_TYPE=nextcloud-compatible
USERNAME=alice
PASSWORD=alice123
2 changes: 1 addition & 1 deletion env.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALICE_WEBID=https://server/apps/solid/@alice/profile/card#me
ALICE_WEBID=https://server/apps/solid/~alice/profile/card#me
COOKIE_TYPE=nextcloud-compatible
61 changes: 30 additions & 31 deletions solid/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* it's instantiated in there
*/


$routes = [
['name' => 'page#approval', 'url' => '/sharing/{clientId}', 'verb' => 'GET'],
['name' => 'page#handleRevoke', 'url' => '/revoke/{clientId}', 'verb' => 'DELETE'],
Expand Down Expand Up @@ -44,47 +43,47 @@
];

$userIdRoutes = [
['name' => 'page#profile', 'url' => '/@{userId}/', 'verb' => 'GET'],

['name' => 'profile#handleGet', 'url' => '/@{userId}/profile{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'profile#handlePut', 'url' => '/@{userId}/profile{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'profile#handlePatch', 'url' => '/@{userId}/profile{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'profile#handleHead', 'url' => '/@{userId}/profile{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],

['name' => 'storage#handleGet', 'url' => '/@{userId}/storage{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handlePost', 'url' => '/@{userId}/storage{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handlePut', 'url' => '/@{userId}/storage{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handleDelete', 'url' => '/@{userId}/storage{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handlePatch', 'url' => '/@{userId}/storage{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handleHead', 'url' => '/@{userId}/storage{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],

['name' => 'calendar#handleGet', 'url' => '/@{userId}/calendar{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handlePost', 'url' => '/@{userId}/calendar{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handlePut', 'url' => '/@{userId}/calendar{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handleDelete', 'url' => '/@{userId}/calendar{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handlePatch', 'url' => '/@{userId}/calendar{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handleHead', 'url' => '/@{userId}/calendar{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],

['name' => 'contacts#handleGet', 'url' => '/@{userId}/contacts{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handlePost', 'url' => '/@{userId}/contacts{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handlePut', 'url' => '/@{userId}/contacts{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handleDelete', 'url' => '/@{userId}/contacts{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handlePatch', 'url' => '/@{userId}/contacts{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handleHead', 'url' => '/@{userId}/contacts{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],
['name' => 'page#profile', 'url' => '/~{userId}/', 'verb' => 'GET'],

['name' => 'profile#handleGet', 'url' => '/~{userId}/profile{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'profile#handlePut', 'url' => '/~{userId}/profile{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'profile#handlePatch', 'url' => '/~{userId}/profile{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'profile#handleHead', 'url' => '/~{userId}/profile{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],

['name' => 'storage#handleGet', 'url' => '/~{userId}/storage{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handlePost', 'url' => '/~{userId}/storage{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handlePut', 'url' => '/~{userId}/storage{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handleDelete', 'url' => '/~{userId}/storage{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handlePatch', 'url' => '/~{userId}/storage{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'storage#handleHead', 'url' => '/~{userId}/storage{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],

['name' => 'calendar#handleGet', 'url' => '/~{userId}/calendar{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handlePost', 'url' => '/~{userId}/calendar{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handlePut', 'url' => '/~{userId}/calendar{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handleDelete', 'url' => '/~{userId}/calendar{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handlePatch', 'url' => '/~{userId}/calendar{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'calendar#handleHead', 'url' => '/~{userId}/calendar{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],

['name' => 'contacts#handleGet', 'url' => '/~{userId}/contacts{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handlePost', 'url' => '/~{userId}/contacts{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handlePut', 'url' => '/~{userId}/contacts{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handleDelete', 'url' => '/~{userId}/contacts{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handlePatch', 'url' => '/~{userId}/contacts{path}', 'verb' => 'PATCH', 'requirements' => ['path' => '.+'], ],
['name' => 'contacts#handleHead', 'url' => '/~{userId}/contacts{path}', 'verb' => 'HEAD', 'requirements' => ['path' => '.+'], ],
];

// @TODO: All routes NOT generated by the UrlGenerator ANYWHERE in the code need to be checked!

if (Application::$userSubDomainsEnabled) {
$userIdRoutes = array_map(function ($route) {
if ($route['name'] === 'page#profile') {
// The profile route should be `/me` instead of `/@{userId}/`
// The profile route should be `/me` instead of `/~{userId}/`
$route['url'] = '/me';
} else {
// When UserSubDomains are enabled, all routes that start with
// `/@{userId}/` should just be `/`, as the userId is present
// `/~{userId}/` should just be `/`, as the userId is present
// in the subdomain.
$route['url'] = preg_replace('#^/@{userId}/#', '/', $route['url']);
$route['url'] = preg_replace('#^/~{userId}/#', '/', $route['url']);
}

// The required userId is set to the userId from the subdomain
Expand Down
6 changes: 3 additions & 3 deletions solid/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"laminas/laminas-diactoros": "^2.8",
"lcobucci/jwt": "^4.1",
"pdsinterop/flysystem-nextcloud": "^0.2",
"pdsinterop/flysystem-rdf": "^0.5",
"pdsinterop/solid-auth": "v0.11.0",
"pdsinterop/solid-crud": "^0.7.3",
"pdsinterop/flysystem-rdf": "^0.6",
"pdsinterop/solid-auth": "^0.12.2",
"pdsinterop/solid-crud": "^0.8",
"psr/log": "^1.1"
},
"require-dev": {
Expand Down
122 changes: 99 additions & 23 deletions solid/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading