I am sharing files from an ownCloud server which I then embed links within an external Drupal site (which requires the user to login before being able to access).
So far I use the the ownCloud REST "share api" to authenticate with the ownCloud server and return a link to a file, however this link is permanent and can be re-used without authentication in the future. So, if the user were to copy the URL link, they could maintain access to the files even if their credentials on the external site were revoked.
Because these links are embedded in an authenticated page I would like to avoid users logging in again into ownCloud to download the files, so I would like to secure them using a short-term token or something similar (I am imagining the sort of workflow: user logs into external Drupal site, site server authenticates with ownCloud server, receives tokens and appends Tokens to download links).
So far, I have searched the official forums, posted on experts exchange, read through the documentation, and googled extensively. It appears to me this functionality does not exist, however, it seems like it should. So if somebody knows, how it could be done? Alternative solutions that could provide a similar result are also welcome!