Commit Graph

27 Commits (master)

Author SHA1 Message Date
Josh d165405d5b
fix(collaboration): Reduce timeouts to 3s for link reference connects
Fixes rest of #34720 

https://github.com/nextcloud/server/issues/34720#issuecomment-1286609205

Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-09-13 10:41:28 +07:00
Julien Veyssier 22bb42be0c
fix(linkReferenceProvider): better size check
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2024-08-30 10:55:57 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Julius Härtl 312314a753
fix: Do not log link reference exceptions as error
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-08-05 22:04:44 +07:00
Daniel Kesselberg 8d3b99349d
docs: update docs for ocp events
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-07-23 21:42:01 +07:00
Jonas 1671bf3ef2
feat(Reference): Add public API endpoints to get references
Calling the public API endpoints will check for matching registered
reference providers that implement `IPublicReferenceProvider` and call
their respective functions. If no matching provider is found, the
default `LinkReferenceProvider` will be used to provide open graph data.

The frontend reference widget components will call these endpoints from
unauthorized sessions, e.g. in public shares.

If present, the sharing token of the origin URL is passed to
`resolveReferencePublic()` as additional information for the reference
provider to determine the access scope. This allows the respective
reference providers to determine whether the origin share has access to
the linked resource.

`getCacheKeyPublic` also gets the sharing token so it can scope the cached
entry to it.

Contributes to #45978

Signed-off-by: Jonas <jonas@freesources.org>
2024-07-17 12:56:41 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Joas Schilling 3b0a9e6639
fix(OCP): Add since tag to all constants
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-15 08:06:43 +07:00
Anupam Kumar 7329b83f92
feat: Migrate LinkReferenceProvider to OCP
This would be useful to eleminate the need for using this OC class
when an app dev wants to implement a custom reference provider
for the web client but wants to fall back on opengraph for mobile
clients.

Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
2024-02-14 18:22:19 +07:00
jld3103 79b8b5c0f2
core: Fix OpenAPI for reference API
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-09-14 15:49:13 +07:00
jld3103 1be836273d
core: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-13 07:24:15 +07:00
Julius Härtl 81c2122ff8
style: Fix php-cs and psalm
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-27 11:10:56 +07:00
Julien Veyssier 8766e4f242
handle and return touchProvider errors
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-01-27 11:10:56 +07:00
Julien Veyssier 48f34736cd
ADiscoverableReferenceProvider implements JsonSerializable
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-01-27 11:10:56 +07:00
Julien Veyssier 946a1af9fd
add 'last used timestamp' management for reference providers
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-01-27 11:10:56 +07:00
Julien Veyssier 6431c5a559
extend the reference API for the new link picker
- add 2 interfaces for discoverable and searchable reference providers
- new OCS route to get info on discoverable/searchable reference providers
- new abstract ADiscoverableReferenceProvider that only implements jsonSerialize
- listen to RenderReferenceEvent to inject provider list with initial state

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-01-27 11:10:55 +07:00
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Julien Veyssier eff783797a
reference url can always fallback to the link itself
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-09-30 19:12:39 +07:00
Joas Schilling 042474bb12
Add since
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-09-26 11:26:34 +07:00
Julius Härtl f69151e626
Move Reference class to public namespace
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-26 10:04:28 +07:00
Julius Härtl 2ddc6c3026
Add event to load scripts for reference rendering
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 20:10:53 +07:00
Julius Härtl 80f6a5834a
Refactor cache handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:24:35 +07:00
Julius Härtl a392235e23
Cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:24:33 +07:00
Julius Härtl 68d0038eb0
Move registration to IBootstrap
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +07:00
Julius Härtl eaef5687f9
Add full public interfaces
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +07:00
Julius Härtl 31be855522
Implement reference provider based caching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +07:00
Julius Härtl de3e541fde
API for fetching reference metadata
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:05 +07:00