Commit Graph

21 Commits (jtr/fix-public-exceptions-http-codes)

Author SHA1 Message Date
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
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
Julius Härtl 972a611288
fix: Avoid clear cache with prefix
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-03-08 09:08:43 +07:00
Faraz Samapoor a304ba5b5a Refactors lib/private/Collaboration.
Mainly using PHP8's constructor property promotion.

Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-10-03 09:17:10 +07:00
Julien Veyssier 0e6d5f8240
improve getUserProviderTimestamps
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-01-27 11:10:56 +07:00
Julien Veyssier b22d4e6306
use array_filter instead of array_map + array_search
Signed-off-by: Julien Veyssier <julien-nc@posteo.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 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
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 1ab66988bc
Inject all dependnencies and increase cache timeout
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 18:02:57 +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 0ce0d37ac1
Implement image caching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +07:00
Julius Härtl f58218deea
Add cache invalidation
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 9d9c7f4b75
Make reference fetching configurable
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