@@ 393-402 (lines=10) @@ | ||
390 | * @throws Share\Exceptions\ShareNotFound |
|
391 | * @throws InvalidShareException |
|
392 | */ |
|
393 | protected function getValidShare($id) { |
|
394 | $share = $this->federatedShareProvider->getShareById($id); |
|
395 | $token = $this->request->getParam('token', null); |
|
396 | if ($share->getShareType() !== FederatedShareProvider::SHARE_TYPE_REMOTE |
|
397 | || $share->getToken() !== $token |
|
398 | ) { |
|
399 | throw new InvalidShareException(); |
|
400 | } |
|
401 | return $share; |
|
402 | } |
|
403 | ||
404 | /** |
|
405 | * Make sure that incoming shares are enabled |
@@ 418-426 (lines=9) @@ | ||
415 | * @throws InvalidShareException |
|
416 | * @throws Share\Exceptions\ShareNotFound |
|
417 | */ |
|
418 | protected function getValidShare($id, $sharedSecret) { |
|
419 | $share = $this->federatedShareProvider->getShareById($id); |
|
420 | if ($share->getShareType() !== FederatedShareProvider::SHARE_TYPE_REMOTE |
|
421 | || $share->getToken() !== $sharedSecret |
|
422 | ) { |
|
423 | throw new InvalidShareException(); |
|
424 | } |
|
425 | return $share; |
|
426 | } |
|
427 | ||
428 | /** |
|
429 | * @param string $resourceType |