Skip to content

Commit 20fc781

Browse files
antoonpmickenordin
andcommitted
feat(OCM-Invites): Implement exchanging cloud IDs through OCM invitation workflow
see https://github.com/cs3org/OCM-API/blob/v1.2.1/IETF-RFC.md Features: - Button to invite remote users to exchange cloudIDs. - WAYF page allowing the receiver of the invite to open and accept the invitation. - Listing of open invitations. - Option to resend, revoke open invitations. Signed-off-by: antoonp <[email protected]> Co-authored-by: Micke Nordin <[email protected]>
1 parent f0d8e07 commit 20fc781

Some content is hidden

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

44 files changed

+2621
-99
lines changed

appinfo/info.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
<background-jobs>
5151
<job>OCA\Contacts\Cron\SocialUpdateRegistration</job>
52+
<job>OCA\Contacts\Cron\UpdateOcmProviders</job>
5253
</background-jobs>
5354

5455
<settings>
@@ -67,4 +68,10 @@
6768
<contactsmenu>
6869
<provider>OCA\Contacts\ContactsMenu\Providers\DetailsProvider</provider>
6970
</contactsmenu>
71+
72+
<commands>
73+
<command>OCA\Contacts\Command\EnableOcmInvites</command>
74+
<command>OCA\Contacts\Command\DisableOcmInvites</command>
75+
<command>OCA\Contacts\Command\SetMeshProvidersService</command>
76+
</commands>
7077
</info>

appinfo/routes.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,23 @@
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

8+
use OCA\Contacts\IWayfProvider;
9+
use OCA\Contacts\Service\FederatedInvitesService;
10+
811
return [
912
'routes' => [
1013
['name' => 'contacts#direct', 'url' => '/direct/contact/{contact}', 'verb' => 'GET'],
1114
['name' => 'contacts#directcircle', 'url' => '/direct/circle/{singleId}', 'verb' => 'GET'],
15+
16+
['name' => 'federated_invites#get_invites', 'url' => '/ocm/invitations', 'verb' => 'GET'],
17+
['name' => 'federated_invites#delete_invite', 'url' => '/ocm/invitations/{token}', 'verb' => 'DELETE'],
18+
['name' => 'federated_invites#create_invite', 'url' => '/ocm/invitations', 'verb' => 'POST'],
19+
['name' => 'federated_invites#invite_accepted', 'url' => '/ocm/invitations/{token}/accept', 'verb' => 'PATCH'],
20+
['name' => 'federated_invites#resend_invite', 'url' => '/ocm/invitations/{token}/resend', 'verb' => 'PATCH'],
21+
['name' => 'federated_invites#invite_accept_dialog', 'url' => FederatedInvitesService::OCM_INVITE_ACCEPT_DIALOG_ROUTE, 'verb' => 'GET'],
22+
['name' => 'federated_invites#wayf', 'url' => IWayfProvider::WAYF_ROUTE, 'verb' => 'GET'],
23+
['name' => 'federated_invites#discover', 'url' => IWayfProvider::DISCOVERY_ROUTE, 'verb' => 'GET'],
24+
1225
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
1326
['name' => 'page#index', 'url' => '/{group}', 'verb' => 'GET', 'postfix' => 'group'],
1427
['name' => 'page#index', 'url' => '/{group}/{contact}', 'verb' => 'GET', 'postfix' => 'group.contact'],

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
]
3434
},
3535
"require": {
36-
"php": ">=8.1 <=8.4"
36+
"php": ">=8.1 <=8.4",
37+
"bamarni/composer-bin-plugin": "^1.8"
3738
},
3839
"require-dev": {
3940
"christophwurst/nextcloud_testing": "^1.0.1",
4041
"phpunit/phpunit": "^9",
41-
"nextcloud/coding-standard": "^1.4",
42-
"bamarni/composer-bin-plugin": "^1.8"
42+
"nextcloud/coding-standard": "^1.4"
4343
},
4444
"extra": {
4545
"bamarni-bin": {

0 commit comments

Comments
 (0)