Since the metadata associated with an OCM share is different between local and remote provider (and the information every site has to store), there is now a clear distinction between the object Share (the one created locally) and the ReceivedShare (the one received from the remote site).
More in details, these are the changes including the breaking changes:
OCMCoreShareRequest (remote share):
Added a list of protocols with all their properties (webdav, webapp and transfer), instead of a single protocol [breaking change]
provider_id is renamed to resource_id [breaking change]
Added sender [breaking change]
Added resource_type, and share_type (previously missing but part of OCM. Behavior remains the same)
Added an optional expiration time
OCMShareRequest (local share sent to a remote grantee):
Removed grant (included permissions and grantee), replaced with just grantee [breaking change]
Added a required list of access methods that match the protocols above [breaking change], and removed permissions as that's incorporated in the access_methods
Added required token, free string [breaking change]. So far we reused the user's token with full power (insecure!), this is the scoped token for the resource with configurable expiration.
Added recipient's share_type (previously missing but part of OCM. Behavior remains the same)
Removed misleading share_type to tell apart Datatx (i.e. transfer) shares from others [breaking change], as this is now captured by the list of protocols / access methods directly.
Added an optional expiration time
ReceivedShare (internal structure to represent a share received from a remote granter)
Added more metadata including the protocols to match the OCMCoreShareRequest [breaking change]
This PR updates the OCM implementation according to the changes introduced in the OCM APIs https://github.com/cs3org/OCM-API/pull/54 and https://github.com/cs3org/OCM-API/pull/57.
Since the metadata associated with an OCM share is different between local and remote provider (and the information every site has to store), there is now a clear distinction between the object
Share
(the one created locally) and theReceivedShare
(the one received from the remote site).More in details, these are the changes including the breaking changes:
OCMCoreShareRequest (remote share):
webdav
,webapp
andtransfer
), instead of a single protocol [breaking change]provider_id
is renamed toresource_id
[breaking change]sender
[breaking change]resource_type
, andshare_type
(previously missing but part of OCM. Behavior remains the same)expiration
timeOCMShareRequest (local share sent to a remote grantee):
grant
(includedpermissions
andgrantee
), replaced with justgrantee
[breaking change]permissions
as that's incorporated in theaccess_methods
token
, free string [breaking change]. So far we reused the user's token with full power (insecure!), this is the scoped token for the resource with configurable expiration.share_type
(previously missing but part of OCM. Behavior remains the same)share_type
to tell apart Datatx (i.e.transfer
) shares from others [breaking change], as this is now captured by the list of protocols / access methods directly.expiration
timeReceivedShare (internal structure to represent a share received from a remote granter)