Skip to content

Commit 5f45e57

Browse files
committed
Add OIDC auth flow
Signed-off-by: Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
1 parent 370ef88 commit 5f45e57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+31826
-151
lines changed

appinfo/info.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
The VO Federation app for Community AAIs allows federated sharing across VO groups independent of the Nextcloud instance any particular group member is using. Nextcloud users who want to participate in VO groups need to link their user account to their Community AAI using OpenID Connect.
1010
1111
VO Federation enhances existing federation features by allowing Community AAIs to define groups on the shared user directory of all trusted Nextcloud instances using the app.]]></description>
12-
<version>0.0.1</version>
12+
<version>0.3.0</version>
1313
<licence>agpl</licence>
1414
<author>publicplan GmbH</author>
1515
<namespace>VO_Federation</namespace>
1616
<category>social</category>
1717
<bugs>https://github.com/nextcloud/vo_federation/issues</bugs>
1818
<dependencies>
19-
<nextcloud min-version="25" max-version="25"/>
19+
<nextcloud min-version="26" max-version="26"/>
2020
</dependencies>
21-
<navigations>
22-
<navigation>
23-
<name>VO Federation</name>
24-
<route>vo_federation.page.index</route>
25-
</navigation>
26-
</navigations>
21+
<settings>
22+
<admin>OCA\VO_Federation\Settings\Admin</admin>
23+
<admin-section>OCA\VO_Federation\Settings\AdminSection</admin-section>
24+
<personal>OCA\VO_Federation\Settings\Personal</personal>
25+
<personal-section>OCA\VO_Federation\Settings\PersonalSection</personal-section>
26+
</settings>
2727
</info>

appinfo/routes.php

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
<?php
2+
3+
declare(strict_types=1);
24
/**
3-
* Create your routes in here. The name is the lowercase name of the controller
4-
* without the controller part, the stuff after the hash is the method.
5-
* e.g. page#index -> OCA\VO_Federation\Controller\PageController->index()
5+
* @copyright Copyright (c) 2023, Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
6+
*
7+
* @author Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
8+
*
9+
* @license GNU AGPL version 3 or any later version
10+
*
11+
* This program is free software: you can redistribute it and/or modify
12+
* it under the terms of the GNU Affero General Public License as
13+
* published by the Free Software Foundation, either version 3 of the
14+
* License, or (at your option) any later version.
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Affero General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Affero General Public License
22+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
623
*
7-
* The controller class has to be registered in the application.php file since
8-
* it's instantiated in there
924
*/
25+
1026
return [
1127
'routes' => [
12-
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
13-
['name' => 'page#do_echo', 'url' => '/echo', 'verb' => 'POST'],
28+
['name' => 'settings#createProvider', 'url' => '/provider', 'verb' => 'POST'],
29+
['name' => 'settings#updateProvider', 'url' => '/provider/{providerId}', 'verb' => 'PUT'],
30+
['name' => 'settings#deleteProvider', 'url' => '/provider/{providerId}', 'verb' => 'DELETE'],
31+
['name' => 'settings#logoutProvider', 'url' => '/provider/{providerId}/logout', 'verb' => 'POST'],
32+
33+
['name' => 'login#login', 'url' => '/login/{providerId}', 'verb' => 'GET'],
34+
['name' => 'login#code', 'url' => '/code', 'verb' => 'GET'],
35+
36+
['name' => 'avatar#getAvatarDark', 'url' => '/avatar/{providerId}/{size}/dark', 'verb' => 'GET'],
37+
['name' => 'avatar#getAvatar', 'url' => '/avatar/{providerId}/{size}', 'verb' => 'GET'],
38+
['name' => 'avatar#deleteAvatar', 'url' => '/avatar/{providerId}', 'verb' => 'DELETE'],
39+
['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/{providerId}/cropped', 'verb' => 'POST'],
40+
['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'],
41+
['name' => 'avatar#postAvatar', 'url' => '/avatar/{providerId}', 'verb' => 'POST'],
1442
]
1543
];

composer.json

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"bamarni/composer-bin-plugin": true
1111
},
1212
"platform": {
13-
"php": "7.4"
13+
"php": "7.4"
1414
}
1515
},
1616
"authors": [
@@ -25,12 +25,37 @@
2525
"cs:fix:imports": "php-cs-fixer fix --rules=ordered_imports",
2626
"psalm": "psalm",
2727
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
28-
"psalm:update-baseline": "psalm --threads=1 --update-baseline"
28+
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
29+
"post-install-cmd": [
30+
"@composer bin all install --ansi",
31+
"\"vendor/bin/mozart\" compose",
32+
"composer dump-autoload"
33+
],
34+
"post-update-cmd": [
35+
"@composer bin all install --ansi",
36+
"\"vendor/bin/mozart\" compose",
37+
"composer dump-autoload"
38+
]
39+
},
40+
"require": {
41+
"firebase/php-jwt": "^5.2"
2942
},
30-
"require": {},
3143
"require-dev": {
44+
"bamarni/composer-bin-plugin": "^1.4",
3245
"nextcloud/coding-standard": "^1.0.0",
3346
"phpunit/phpunit": "^9.5",
3447
"vimeo/psalm": "^4.19"
48+
},
49+
"extra": {
50+
"mozart": {
51+
"dep_namespace": "OCA\\VO_Federation\\Vendor\\",
52+
"dep_directory": "/lib/Vendor/",
53+
"classmap_directory": "/lib/autoload/",
54+
"classmap_prefix": "NEXTCLOUD_VO_FEDERATION_",
55+
"packages": [
56+
"firebase/php-jwt"
57+
],
58+
"delete_vendor_directories": true
59+
}
3560
}
3661
}

0 commit comments

Comments
 (0)